Sign in to follow this  
Followers 0
RDX1

How do I transfer files via SSH?

6 posts in this topic

With SSH, how would I transfer one large file on server A to server B?

Share this post


Link to post
Share on other sites

A variety of possibilities. You can use a sftp client, such as psftp [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html] (I think filezilla is capable of sftp as well). This behaves like a normal ftp client, but through an ssh tunnel. The server must support sftp connections for this to work.

The other way (and easiest for just one file) is via scp. scp is like the cp command, but over an ssh tunnel. The command works like this:

scp /path/to/my.file me@serverB:/path/to/destination/my.file

Share this post


Link to post
Share on other sites

Thanks, I will do some man pages on scp and more research on my own.

Share this post


Link to post
Share on other sites

I prefer wget :]

Share this post


Link to post
Share on other sites

I prefer wget :]

and WTF does that have to do with ssh?? wget is for retrieving files using HTTP, HTTPS and FTP.. NOTHING what so ever to do with ssh..

vlad got you started.. what sshd are you running? openssh? vserver from vandyke? it should support sftp no problem. Are you looking for windows client to use? if so winscp is FREE and a great little app that supports both sftp and scp. vandyke has a none free client that is good securefx. On a windows machine you could just use cygwin, etc.. etc..

http://winscp.net/

You can also just tunnel ftp through your ssh connection.. you can tunnel any method of file xfer through your ssh connection for that matter ;) Yes even wget - if done correctly ;)

Some exact details of what your trying to do would be helpful in helping you further.

Share this post


Link to post
Share on other sites

scp and rsync are probably the best.

Rsync is good for on the fly compression and also it will not copy data that's already there, which saves on bandwidth.

You can use it with lots of different switches, `man rsync` an example of copying /copy/me , to a remote server with [serverip] and putting the data in /where/to would be

rsync -avz -e ssh /copy/me login@serverip:/where/to

Also be careful of /'s for example

rsync -avz -e ssh /copy/me/ login@serverip:/where/to

Will copy everything inside the dir and not the dir.

-Scott

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.