Comments on How to Install and Use SFTP on Linux Servers

SFTP or SSH File Transfer Protocol is a method for securely transferring data between computers. In this guide, you will learn how to set up SFTP Server on a Linux system.

3 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: John at: 2022-04-05 03:05:44

On ubuntu, it is bonehead easy. No need for anything else:

   $ sudo apt install ssh

That's it.  You can make it harder if you like, but it isn't necessary.  That command enables ssh, and scp and sftp-server for all normal users. 

It would be a good idea to install fail2ban to block brute force attempts.

   $ sudo apt install ssh fail2ban

the default fail2ban settings protect ssh on port 22/tcp, so no configuration is necessary.

Once ssh is installed on a Linux workstation and the remote server, we can use almost any Linux file manager with a URL like : sftp://ip/ to access the remote file system.  Some file managers use ssh://ip/ others use something else, but sftp:// is the correct answer. Of course, once ssh is setup and working, we have access to all the other greatness that is ssh dependent ... scp, sftp, rsync, most backup tools, sshfs, x2go (or any NX remote desktop), stunnel, X11-forwarding (run remote GUI applications), and ssh port forwarding which can be used for all sorts of goodness.  vim supports remote editing over ssh too.  There must be 50 other things that ssh makes possible.

ssh is how Unix systems communicate.  Be certain to setup ssh-keys to make all of these connections nearly seamless.  That's 2 commands.

   $ ssh-keygen -t ed25519   $ ssh-copy-id -i ~/.ssh/id_ed25519.pub username@remote

Only need to create the key once. The public key can be pushed to multiple remote systems/servers/desktops.

 

By: thctlo at: 2022-04-05 11:08:42

Just a tip, article is great.. but you can do this very easy with the package : mysecureshell 

By: typo at: 2023-01-13 14:53:08

you have a type in the command blocks when you access the server you are missing the s at the username