LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   sftp and ssh-keygen help please (https://www.linuxquestions.org/questions/linux-newbie-8/sftp-and-ssh-keygen-help-please-68295/)

grayhost 06-26-2003 05:38 PM

sftp and ssh-keygen help please
 
I need to automatically copy a file at regular intervals from an account on one server to an account on the other. I know how to set this up in Cron and I know the parameters for SFTP and batch mode. Doing this on command line (via SSH) on the "target" server, SFTP asks for the password for the "from" account on the "source" server. But it works when I type that password.

I'm told I can generate RSA keys on the source server and copy those keys to the target server - and then SFTP will use those keys. I've run ssh-keygen and got some keys (private and public) in 2 files called "id_rsa" and "id_rsa.pub" in /home/*account*/.ssh on the source server.

And now I'm stuck! Most places I've looked for documentation assume a level of Unix and ssh knowledge I don't have. I'd be grateful if some kind person would point me to some good documentation or give me step-by-step instructions for getting that public key into the right place in the right file/folder on the target server so that SFTP will run unprompted in SSH and Cron on the target server.

It's probably really simple, but I ain't got it. :-) Thanks!!

green_dragon37 06-26-2003 05:46 PM

Here is a good howto on how to do that, using rsync ofer ssh instead of sftp though, but it goes over the private/public key thing nicely.

http://www.unixadm.net/howto/rsync-ssh.html

Ian

grayhost 06-26-2003 05:51 PM

Thanks - I'll check it out


All times are GMT -5. The time now is 07:52 AM.