ssh(scp) without password

Useful function for exchanging data between servers without typing password.

 

(1) ssh-keygen -t rsa

“Generating public/private rsa key pair”

“Enter file in which to save the key …”

just push “enter” two times.

 

“Enter passphrase (empty for no passphrase):”

we are not going to use “passphrase”, so press “enter” key.

 

then,

“Your identification had been saved in …”

“Your public key has been saved in …”

 

*you should remember the key file name and its direction.(end with *.pub)

 

(2) copy that key to remote linux computers.

adds to “/home/your_id/.ssh/authrized_keys”

Done!!

 

(3) test

scp file.txt your_id@ip_address:/home/.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s