cloudchamber
cloudchamber

Reputation: 121

Transferring files with SFTP

So I'm trying to transfer files to a remote computer on an SSH system. 'I've used the sftp command, used lls to confirm the presence of the file in the local computer, and then implemented the put filename command. However, I receive the same result each time:

stat filename: No such file or directory

I just don't know what's going wrong! Any help or troubleshooting tips would be appreciated.

Upvotes: 0

Views: 2349

Answers (4)

Serge Kishiko
Serge Kishiko

Reputation: 486

I was facing also in this issue when trying to upload files from the local to the remote server. I did commands well and clean but the mistake I was making was that: I've logged into the remote server with ssh and then login with sftp. In that way, sftp will consider that your remote server is the local (as I logged in first to this via ssh) when using the command below:

put /c/path/to/file.txt

So, the thing to do is to login directly to the server via sftp and putting your local files in there.

Upvotes: 0

agardler
agardler

Reputation: 66

If you're currently using Windows you can download winscp and use that to transfer files. It has a nice graphic interface that is easy to interact with

Upvotes: 1

Cole Tierney
Cole Tierney

Reputation: 10324

The sftp command line client uses the ssh transport and will tunnel your connections using your key. So if you have ssh access, you should also have sftp access. This is a secure option for people who are more comfortable with ftp. Most GUI ftp clients should also support sftp.

Upvotes: 0

Arkoudinos
Arkoudinos

Reputation: 1127

Well, supposing that you are on a Linux/Unix environment, you could use scp. Typically, the syntax for an scp command would be like this:

$ scp foobar.txt your_username@remotehost.net:/some/remote/directory 

The above command copies the file foobar.txt which resides in the local computer, to a specific directory in the remote machine, using a username (you will be asked for a password later).

Upvotes: 0

Related Questions