22 December, 2009

How to install ssh with sftp server?

I wanted to install ftp server on my little home server. So I googled it. I found out that it would be safer to use sftp instead of ftp, which would be file transfer for ssh. It's also easier you can just type ssh://username@www.example_domain.com in your nautilus and if you see your files then you have successfully logged in. You can easily make new users and give them permissions through ssh configuration files.

To enable it you need ssh server, if you don't have it:

sudo apt-get install openssh-server

Then you have to change a row in your OpenSSH server configuration file:

sudo nano /etc/ssh/sshd_config

Replace the line:

Subsystem sftp /usr/lib/openssh/sftp-server

with:
Subsystem sftp internal-sftp


NB: This works on Debian and all distributions based on it, like Ubuntu. The default port is 22 for ssh so you probably want it to be opened, if you want to access your sftp outside lan.

No comments:

Post a Comment