LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-26-2003, 05:38 PM   #1
grayhost
LQ Newbie
 
Registered: Jun 2003
Posts: 2

Rep: Reputation: 0
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!!
 
Old 06-26-2003, 05:46 PM   #2
green_dragon37
Member
 
Registered: Oct 2002
Location: Lower Alabama
Distribution: Slackware, OpenBSD 3.9
Posts: 344

Rep: Reputation: 31
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
 
Old 06-26-2003, 05:51 PM   #3
grayhost
LQ Newbie
 
Registered: Jun 2003
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks - I'll check it out
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 02:50 AM
problem with SSH-KEYGEN with some server ohgin Linux - Newbie 1 08-17-2005 10:35 AM
How to ssh-keygen? Baran Linux - Networking 5 04-26-2005 02:40 PM
ssh-keygen problem mijohnst Linux - Networking 5 07-20-2004 01:00 PM
ssh-keygen run time fatman Linux - Software 5 01-11-2004 12:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration