| Automatic login with ssh
- in the following, the client is, for example, your office PC, and the server is for example bolle
- make sure you have a ~/.ssh subdirectory on both
- on the client:
ssh-keygen -t rsa1 ssh-keygen -t dsa (for both, enter a passphrase when prompted) (it may be you only need an RSA key, for example, or that you need a key of type rsa instead of rsa1) - add this line to your .login:
/usr/bin/ssh-agent | grep -v echo > ~/.ssh/env.dat (the grep is to get rid of the echo of the process id) - and add this line to your .cshrc:
source ~/.ssh/env.dat - cd .ssh
scp identity.pub bolle.cs:~/.ssh scp id_dsa.pub bolle.cs:~/.ssh - also on the client:
create a file ~/.ssh/config, with the lines: Host * PreferredAuthentications publickey,password - next, on the server:
cd .ssh cp identity.pub authorized_keys cp id_dsa.pub authorized_keys2 chmod 600 * - on the client, try it out:
ssh bolle |
Send me your comments!
Something didn't work as expected? You'd like to add some useful info to this tip? Use the form below to send me your comments. (Don't forget to fill out the super-lame CAPTCHA below..)