FedoraForum.org - Fedora Support Forums and Community
Results 1 to 9 of 9
  1. #1
    yinglcs Guest

    Config SSH to remember my password

    Hi,

    I often need to SSH to some servers in my environment.
    Is it possible to configure SSH so that i remember my password after I type in the first time so that I don't need to retype it every time?
    Thank you.

  2. #2
    Join Date
    Jun 2006
    Location
    Texas
    Age
    55
    Posts
    4,164
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Eh? That is too risky.

    If someone hack into that one PC that was set to remember all the password, you are OWNED.

    I use this to store all my passwords on a thumbdrive.
    http://passwordsafe.sourceforge.net/

  3. #3
    pete_1967 Guest
    Go to your .ssh directory, type `ssh-add [private_key_name e.g. id_rsa]` and enter your password. It will be remembered as long as you are logged in to session.

    If you are logging onto the machine that has used ssh-add to remember the password remotely, you still need to enter it every time (it only works on local sessions).

  4. #4
    Join Date
    Aug 2005
    Posts
    3,172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    pete

    Could he add something to his .bash_profile (or the one that runs every time you log in) to do your above solution?

    Just a thought
    Lazlow

  5. #5
    pete_1967 Guest
    Quote Originally Posted by lazlow
    pete

    Could he add something to his .bash_profile (or the one that runs every time you log in) to do your above solution?

    Just a thought
    Lazlow
    Code:
    if [[ -e $HOME/.loggedin ]]
            then
                    rm -f $HOME/.loggedin
            else
                    touch $HOME/.loggedin
                    ssh-agent sh -c 'ssh-add < /dev/null && bash'
    fi
    Should work (not tested). You still need to enter the password once.

    Personally I don't see much benefit on that but all for their own...

  6. #6
    Join Date
    Mar 2007
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    FWIW... I always have used the following:

    $ ssh-keygen -f ~/.ssh/identity -t rsa -P ""
    $ chmod 600 ~/.ssh/identity*
    $ scp ~/.ssh/identity.pub remote:/path/to/.ssh/authorized_keys2

    Test your login:
    $ ssh -i ~/.ssh/identity username@hostname

  7. #7
    pete_1967 Guest
    Quote Originally Posted by Nipperspot
    FWIW... I always have used the following:

    $ ssh-keygen -f ~/.ssh/identity -t rsa -P ""
    $ chmod 600 ~/.ssh/identity*
    $ scp ~/.ssh/identity.pub remote:/path/to/.ssh/authorized_keys2

    Test your login:
    $ ssh -i ~/.ssh/identity username@hostname
    Using passwordless private key is about as useful and secure as not using keys at all.

  8. #8
    Join Date
    Mar 2007
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by pete_1967
    Using passwordless private key is about as useful and secure as not using keys at all.
    That is what I initially thought, but where I had been employed for years said this method is secure and best to use. Ironically, we all never signed off of our workstations and anyone could easily have logged on the servers. Entering a password is the best method of security.

  9. #9
    pete_1967 Guest
    Quote Originally Posted by Nipperspot
    That is what I initially thought, but where I had been employed for years said this method is secure and best to use. Ironically, we all never signed off of our workstations and anyone could easily have logged on the servers.
    And your network admins/ sysadmins actually got paid? What was the company, I think I'll apply to work for them

    It's not only that you leave your system open at work, anyone logging on to your system remotely can access everywhere the key is used. Seriously, why they bothered telling people to use keys when same time they told you to throw away the lock?

Similar Threads

  1. system config GUI keeps asking for password
    By Pierre Albarede in forum Security and Privacy
    Replies: 0
    Last Post: 17th February 2009, 02:22 PM
  2. Printer Config - Won't accept password?
    By Mertahn in forum Using Fedora
    Replies: 5
    Last Post: 31st July 2008, 07:34 AM
  3. wpa_supplicant.config password?
    By Jeff Sadowski in forum Using Fedora
    Replies: 1
    Last Post: 22nd November 2006, 12:42 AM
  4. I can't remember my password!
    By blammo in forum Linux Chat
    Replies: 4
    Last Post: 26th October 2004, 06:02 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •