(copied from security forum, ssh login attempts thread)
put your private key into the remote system in a file called authorized_keys.
1) Check if you have a .ssh directory
ssh user@remotehost 'ls -l .ssh'
2) If not:
ssh user@remotehost 'mkdir .ssh'
3) Copy your public key
scp $HOME/.ssh/id_rsa.pub user@remotehost:.ssh/authorized_keys
NOTE: if the .ssh directory and the authorized_keys file already exist and the remote system / account are shared or you access user@remotehost from more than one machine then do the following:
scp $HOME/.ssh/id_rsa.pub user@remotehost:.
then
ssh user@remobehost 'cat id_rsa.pub >> .ssh/authoized_keys' to append to rather than overwrite the authorized_keys file.
thatīs what i used. also the authorized_keys-file is configured in sshd config file. adjust your config accordingly.
|