In this post I described how to connect remote VPS server with local Ubuntu nautilus. I am using Ubuntu 20.04 and for the VPS or remote server I've been using Oracle Cloud Infrastructure.
In this post I am not going to write the process of creating cloud instance on OCI. For demonstrating the connection I've create a cloud instance with the following parameters-
Parameter names | Properties |
---|---|
Instance name | media-server |
Image | Ubuntu minimal 20.04 |
Public IP | 152.67.xxx.xx |
When creating the instance I downloaded the private ssh key
Here are the steps for connecting remote server to Ubuntu 20.04 Nautilus -
Step 1
To use ssh key with .key file extension we need to convert it to .pem file using this command
bash
$ openssl rsa -in path/to/private.key -text > private.pem
Step 2
Now create and edit config file in ~/.ssh folder
bash
$ gedit ~/.ssh/config
The config file should contain Host name, User name, port and the private key (.pem file) path. In my case the config file contains these lines -
Host media-server
HostName 152.67.xxx.xx
User ubuntu
Port 22
IdentityFile /path/to/private.pem
Compression yes
Step 3
Now we need to change the access permission for the .pem file and .ssh folder using the following two command -
bash
$ sudo chmod 600 /path/to/private.pem
$ sudo chmod 755 ~/.ssh
Step 4
Now open Nautilus and go to Other loaction.
There is a Connect to server input field at the bottom.
Enter your host title followed by ssh://.
In my case I entered ssh://media-server
in the input.
Now press Connect. Within few seconds Nautilus will mount the server location.
Congrats 🎉. You have now full access to your remote server files and folders through your local Ubuntu nautilus.
You can also connect Ubuntu terminal with your remote server using this command -
bash
$ ssh media-server
Or in nautilus, by right clicking inside any remote folder you will have two options -
open in remote terminal
open in local terminal
By connecting local file manager (nautilus) with remote server we can now create, edit or delete any files or folders using the GUI of nautilus. This helps to easily navigate to different folders at remote server. Also opening terminal at any remote folder location never been so easier.
Thank you for reading my first post at dev.to.
Top comments (1)
Good. Remote server location add to Ubuntu Nautilus using SSH, you can use the "Connect to Server" feature., you need to have SSH access enabled on the remote server and have the necessary permissions to connect using SSH.