How to use Ubuntu desktop to connect to remote serversLearn how to mount a remote directory, use protocols like SMB, FTP, SSH and SFTP.
All kinds of developers often need to access a server somewhere on the web. Of course we clans of developers know how to make a secure shell session with the SSH protocol/service using a key or a the users password:
ssh [email protected] -p 22
In this article, I lay out how I connect to my web servers to make remote commands and data transfers. I’ll assume you have a linux based machine (Ubuntu 18.04 in this article specifically)
Mounting a directory at the server
Ubuntu has the simple and beautiful nautilus file browser (similar to windows file explorer). If you launch it you can see from the left side menu a list of bookmarks and everything you mounted.
You can mount a directory at your server by going to other locations (last item in the menu) and in the connect to server bottom bar, type in the connection (ex: sftp:/domain.com):
You will then be prompted to enter the server’s credentials:
You can choose the right protocol (the method of connection), sample protocols are:
- SMB: Samba which implements part of the SMB protocol: use smb://example.com/pa/th. I use this to mount a directory from my local cloud drive or a windows network shared location on the local network. Be ware that this method is not recommended to connect to remote servers on the internet because samba is not a secure protocol like Ssh for example. And you need to have the samba server activated at the other end
- FTP: I use this method to connect to servers on the same network as my computer, this protocol is fast but has no encryption and not secure, a man in the middle can easily sniff the password in case the connection medium is compromised.
- SFTP: or FTP over SSH, I use this most of the time, this protocol uses SSH to transfer files, and is secure and safe to use to connect servers outside of your local network. there are many clients that use this protocol to transfer and even edit files on a remote server, the best I can find are Filezilla on linux or mac machines, and WinSCP on Windows machines.
And there are many different options, though these 3 are used most of the times.
Using Third party SSH Clients
Examples are FileZilla (Unix) and Putty/WinSCP (Windows). these provide a simple interface to make a connection to a server, you just have to provide a username, domain, and connection credentials. Then you can view files on the server as if it was a local machine.