Many time bash scrip demands scp. OR you may not wish to enter password every time you access remote server.
Generate key for local system.
For old system not equipped with ssh-copy-id
ssh-keygen -t rsaCopy key to remote server.
ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.1.1Now you can ssh / scp without entering password.
For old system not equipped with ssh-copy-id
ssh-keygen -t rsa
scp ~/.ssh/id_rsa.pub root@192.168.1.1:
ssh root@192.168.1.1 ‘cat id_rsa.pub >> .ssh/authorized_keys’
No comments:
Post a Comment