LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   To copy from one server to another without asking for password (https://www.linuxquestions.org/questions/linux-newbie-8/to-copy-from-one-server-to-another-without-asking-for-password-896580/)

RAVINDER_KUKREJA 08-10-2011 11:24 AM

To copy from one server to another without asking for password
 
Hi All,

Suppose I want to copy so may files from one server to another server. If i will use scp , then every time it will ask for user password..
Kindly share the complete procedure to do this . like what to take from path /usr/bin/ssh-keygen & copy to which path on 2nd server.

Kindly share setpwise.

Thanks in advance.

EricTRA 08-10-2011 11:29 AM

Hello,

What have you tried and where is it failing? Or didn't you even look at Google? We're not here to offer you step by step guides or copy/paste howtos while there are tons of them on the Internet just waiting for you to be found. Have a look at the following:
http://www.cyberciti.biz/faq/ssh-pas...uthentication/
http://www.debian-administration.org/articles/530
Just two of the thousands of hits found through Google, your best friend.

Kind regards,

Eric

sundialsvcs 08-10-2011 12:08 PM

The best way to set up 'ssh' is through the use of digital certificates. Please "Google that."

In fact, you should set up the system such that the only way to connect to it is through certificates.

rkdavies 08-10-2011 02:08 PM

I love how 20 years ago, the standard response was always "RTFM" and over the years it's changed to "Google It".

It's vanilla responses like that which created a need for sites such as this, to help those learning a new environment to be able to do so with ease and find friendly assistance...

Ravinder,

Once you have completed ssh-keygen, it will save your keys to ~/.ssh (/home/username/.ssh) as id_dsa and id_dsa.pub

Copy the contents of id_dsa.pub to ~/.ssh/authorized_keys on the server you wish to scp to, and make sure /etc/ssh/sshd_config has AuthorizedKeysFile %h/.ssh/authorized_keys uncommented (remove the #), and restart ssh, usually '/etc/init.d/sshd restart'.

Please note, you will have to assign a blank passphrase during ssh-keygen to make it passwordless. This is a giant security hole, as anyone with a copy of your private key, id_dsa, will be able to authenticate as that user.


All times are GMT -5. The time now is 06:32 PM.