LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-21-2006, 11:28 PM   #16
OzTEXS
LQ Newbie
 
Registered: Dec 2006
Distribution: Redhat ES 4.0
Posts: 21

Original Poster
Rep: Reputation: 15

chort .. it seems the sftp -i option is not valid on my version of sftp ??
 
Old 12-21-2006, 11:35 PM   #17
OzTEXS
LQ Newbie
 
Registered: Dec 2006
Distribution: Redhat ES 4.0
Posts: 21

Original Poster
Rep: Reputation: 15
maybe should use the -o option ?

Last edited by OzTEXS; 12-21-2006 at 11:40 PM.
 
Old 12-22-2006, 01:33 AM   #18
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Quote:
Originally Posted by OzTEXS
maybe should use the -o option ?
Whoops! Right you are. My bad.

Code:
sftp -o IdentityFile=/home/saturn/.ssh/id_rsa_batch -b /home/saturn/bin/send.sh user@host
 
Old 12-27-2006, 04:43 PM   #19
OzTEXS
LQ Newbie
 
Registered: Dec 2006
Distribution: Redhat ES 4.0
Posts: 21

Original Poster
Rep: Reputation: 15
bugger .. that switch options still did not work .. iam still getting a authentication error.

Can I confirm I need to rename the private key file I got from the host to id_rsa_batch ??
 
Old 12-27-2006, 11:42 PM   #20
OzTEXS
LQ Newbie
 
Registered: Dec 2006
Distribution: Redhat ES 4.0
Posts: 21

Original Poster
Rep: Reputation: 15
should I ask the remote server to send us a public key instead of a private key ? would that make any difference.
 
Old 12-28-2006, 01:39 AM   #21
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
You don't need to name the key anything special. All you need to know is:

The host opening the connection must have the private key.

The host receiving the connection must have the public key.

On the host sending, the key should exist in /home/saturn/.ssh . You can name it anything you like.

On the host receiving, the public key should be appended to /home/user/.ssh/authorized_keys .

The user on the sending host doesn't need to be the same as the user on the receiving host, but the private key needs to be in the .ssh directory of the user opening the connection and the public key needs to be in the .ssh/authorized_keys file of the user receiving the file.

I recommended generating a new key without a passphrase so that you don't need to use the key agent. To be clear, I don't recommend removing the passphrase from your current key, what I'm suggesting is to create a new key and append the public portion of it to the /home/user/.ssh/authorized_keys file on the host that you're sending the files to.
 
Old 12-28-2006, 04:38 PM   #22
OzTEXS
LQ Newbie
 
Registered: Dec 2006
Distribution: Redhat ES 4.0
Posts: 21

Original Poster
Rep: Reputation: 15
Question

Ok chort ..

Here is the layout just to be clear on who is sending and who is receiving.



Linux Box ------ > sftp file tx to remote --------> Remote Windows Box
Private Key Key generated from here.

So I have a private key sent by the remote server, as they are the ones who need the files that we send.

I have since asked them to provide a public key for us to use instead of the private. So going by what you stated below they are receiving so they should have the public key ?

This is getting confusing
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
SFTP in shell script jantman Linux - Software 3 11-27-2006 11:12 PM
cronjob php script MrSako Linux - General 1 08-27-2006 08:30 PM
cronjob not working but script works dtra Linux - Newbie 4 02-28-2005 06:05 PM
sftp over shell script naughtymutt Linux - General 1 08-20-2004 06:56 AM
sftp script error JeRrYmAn Linux - Networking 1 11-27-2003 08:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:10 PM.

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