use ssh scp without password - AthenaTzeng/myTool Wiki

[email protected] want to use ssh/scp to [email protected]

IDEA: make a pub/priv key for from and write the pub_key to to

from$ ssh-keygen -t rsa Enter file in which to save the key (/home/from/.ssh/id_rsa):[Enter] Enter passphrase (empty for no passphrase):[Enter] Enter same passphrase again:[Enter]

from$ **scp /.ssh/ [email protected]:/** [Enter password]

to$ cat >> .ssh/authorized_keys2 ==>NOTE: this is because of that the authorized_keys2 might exist if so, just add the chars in at the end of the file

  1. NOTE for dsa from$ ssh-keygen -t dsa to$ cat >> .ssh/authorized_keys

  2. NOTE!!! from and to must be the correct users only this two users can have the no-password ssh link (scp)