1753432 Members
4572 Online
108793 Solutions
New Discussion юеВ

File transfer with SSH

 
SOLVED
Go to solution
Gary Glick
Frequent Advisor

File transfer with SSH

I have been told that a trading partner of my companies wants to do file transfers utilizing the SSH protocol. After spending a bit on trying to figure this out it is not clear how this would be done. Could someone explain how this could/can be accomplished. the transfer will be via a script so any thoughts on how to structure a script to do a put from server A to server B.

Thank you

Gary
7 REPLIES 7
Tim Nelson
Honored Contributor

Re: File transfer with SSH

install and use ssh.

create required userids

exchange public keys

Dave Hutton
Honored Contributor

Re: File transfer with SSH

There is such thing as scp or sftp.
Both are secure and I'm guessing both can be scripted the same as rcp or ftp.

IT_2007
Honored Contributor

Re: File transfer with SSH

Once you install ssh product on both servers then you need to generate rsa keys on Server A and copy them to authorized_keys file on ServerB:/homedir/.ssh directory.

set 0600 permission for that file.

then issue command or use cron job on Server A to copy:

serverA:\ $ scp /fromdir/file user@serverB:/destinationpath



Arunvijai_4
Honored Contributor

Re: File transfer with SSH

Hi Gary,

You can use scp a.k.a Secure Copy. It comes with Secure shell depot by default.

# man scp for more details.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Arturo Galbiati
Esteemed Contributor
Solution

Re: File transfer with SSH

Hi Gary,
some time ago I encountred same problem and the attcahed doc helps me a lot!
HTH,
Art
Steven E. Protter
Exalted Contributor

Re: File transfer with SSH

Shalom Gary,

Download this:

http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA

It is free.

swinstall -s full path to depot \*

If the name is T1477blah.depot

swinstall -s /tmp/T1477blah.depot \*

Once you have followed the above instructions for password free file transfer the scp command will copy files around.

Note that this is slower than say nfs or rcp, because the authentication and data transfer are both encrypted.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Gary Glick
Frequent Advisor

Re: File transfer with SSH

Thanks to everybody for your help. I've got it set up and working on my end.


Gary