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.
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.
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/
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).
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
Originally Posted by lazlow
Should work (not tested). You still need to enter the password once.Code:if [[ -e $HOME/.loggedin ]] then rm -f $HOME/.loggedin else touch $HOME/.loggedin ssh-agent sh -c 'ssh-add < /dev/null && bash' fi
Personally I don't see much benefit on that but all for their own...
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.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. Entering a password is the best method of security.Originally Posted by pete_1967
And your network admins/ sysadmins actually got paid? What was the company, I think I'll apply to work for themOriginally Posted by Nipperspot
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?