Basic SFTP Usage

From DSL Wiki

Basic SFTP Usage (and other neat stuff)

SFTP: Secure File Transfer Protocol

AKA: FTP through SSH

  • Use DSL to SFTP to another DSL boxen.
  • Use a Windows PC to SFTP to a DSL boxen.
  • Use your Windows PC as an SSH server.


This is supposed to be a pretty secure method to transfer files, and, it is faster than plain old FTP... at least in my experience.


DSL box : DSL box

To SFTP from one DSL box to another DSL box, you can do the following:

sftp [email protected]

Insert whatever IP you need there. You can also put in a hostname if you have one. "dsl" represents the username, so change it according to your needs. This assumes you have port 22 (ssh) running on your server.

Once logged in with sftp, you can then change directory to where the file is you want to get and then use the 'get' command to get it. You can also use the 'put' command in the same way, but to put files instead of get them. Or, you can include the path and filename in the logon.

           dsl@box:/$ sftp --help
           usage: sftp [-vC1] [-b batchfile] [-o option] [-s subsystem|path] [-B buffer_size]
           [-F config] [-P direct server path] [-S program]
           [user@]host[:file [file]]


(You may need to check/change permissions on files/directories to make sure you are allowed to put or get if you are experiencing permission denied errors.)

Read this sftp man page: http://www.eos.ncsu.edu/remoteaccess/man/sftp.html


Windows PC : DSL box

To SFTP from a Windows PC to a DSL box, I use iFTP.

http://www.memecode.com/iftp.php

I got the version of iFTP with SFTP.

I keep iFTP on a USB memory thingy so I always have it with me. Yes, it says FTP, but you can change the port to 22 or 222 or whatever, and it saves your connection profiles. It's fairly intuitive.

Remember to have your firewall rules set up to allow port 22, (or whatever port you use) open to the world or just a specific IP address.... assuming you have a firewall and know how to use it.


But wait, there's more......

You can turn your windows box into an SSH server as well, and very quick and easy.

Go here: http://www.freesshd.com

Get it, install it, use it. It is also fairly intuitive to get going. Poke around on the different options and you'll see how it works. You DO NOT need to install anything else to use this and it's small.

Goot luck.


This article thrown together by: green