Quote:
|
Originally Posted by fahadsaeed
Helllo,
(snip by fsck)
HTML Code:
ssh-keygen -t rsa
ssh admin@192.168.0.9 "mkdir -p .ssh;chmod 0700 .ssh"
scp .ssh/id_rsa.pub admin@192.168.0.9:/tmp
ssh admin@192.168.0.9 "cat /tmp >>/home/admin/.ssh/authorized_keys2
PLease help 
|
EDIT:
Sorry, let me be clearer.
If you have run "cat /tmp >> authorized_keys2", then your authorized_keys2 file may well be corrupted, and any additional keys added to it may not be recognised.
If you ONLY want to use the key you are now copying for authorisation, then run the commands again but change the last line to read:
Code:
ssh admin@192.168.0.9 "cat /tmp/id_rsa.pub >/home/admin/.ssh/authorized_keys2
(Note! There is only 1 ">" in that command, it will overwrite the authorized_keys file)
If there are keys in the existing file which need to be saved, you should copy the file to one side to make a backup, then edit authorized_keys2 to leave only the keys in the file, and not the corruption.
Also, ensure that your "identity" key in the local .ssh directory is set correctly, or use the "-i" option to ssh.
C.