[TUTORIAL] Easy access to remote folders

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
User avatar
Wibol
Level 6
Level 6
Posts: 1382
Joined: Fri Nov 27, 2015 7:00 am
Location: España

[TUTORIAL] Easy access to remote folders

Post by Wibol »

SSH is the name of a protocol and the program that implements it, the main function of which is remote access to a server via a secure channel in which all information is encrypted. In addition to connecting to other devices, SSH allows secure copying of data, both single files and simulating FTP sessions.

We can use its SFTP (Secure File Transfer Protocol) capability graphically from our file explorer to access remote resources and work with them as if they were a local disk. Files and folders will be accessible both from the local network and from outside the home or office. For the latter, it is necessary to open port 22 on the router and redirect it to the server's IP.

Security is guaranteed as the connection is encrypted and we must know the IP, user and password of the remote computer.
It is necessary to replace the values written in CAPITAL LETTERS by those appropriate to each case.

Server
If the server is a VPS we can skip this section and go directly to Clients.
  1. Install OpenSSH on the server machine:

    Code: Select all

    apt install openssh-server
  2. Open its default port in the Mint firewall:

    Code: Select all

    sudo ufw allow ssh
  3. We check that it is working:

    Code: Select all

    ssh REMOTE-USER@localhost
  4. Type "exit" and press Enter to disconnect.

Clients
  1. We access to server from a client:

    Code: Select all

    ssh REMOTE-USER@REMOTE-IP
    Captura de pantalla de 2023-02-05 10-59-52.png
    During the first connection, we will be informed that the remote machine is not in our local list of known machines and asked if we want to continue with the connection. Answer yes and it will be added to the list. It will then ask us to enter the password of the remote user used for the connection
  2. Type "exit" and press Enter to disconnect.

Connecting graphically to server from a client:
  • In Cinnamon, Nemo / File menu / Connect to a server...
    Server: REMOTE-IP
    Port: 22 (if not changed)
    Type: ssh
    Folder: /REMOTE/FOLDER/FULL/PATH
    Username: REMOTE-USER
    Password: REMOTE-USER-PASSWORD

    Captura de pantalla de 2023-02-05 11-04-15.png

  • If your file explorer does not have this wizard, you can still enter this in its address bar:

    Code: Select all

    sftp://REMOTE-USER@REMOTE-IP/REMOTE/FOLDER/FULL/PATH
    sfpt-nemo.png
    Once we are in the remote folder, we can add it to Bookmarks for quick access.
  • We can also create a launcher on the desktop with one of these commands depending on whether we use Cinnamon (Nemo), MATE (Caja) or XFCE (Thunar):
    • nemo %U sftp://REMOTE-USER@REMOTE-IP/REMOTE/FOLDER/FULL/PATH
    • caja %U sftp://REMOTE-USER@REMOTE-IP/REMOTE/FOLDER/FULL/PATH
    • thunar %U sftp://REMOTE-USER@REMOTE-IP/REMOTE/FOLDER/FULL/PATH

The system should ask for the remote password and give you the option to save it.
Image

No olvides:
  • Leer la Guía de publicación antes de hacer una consulta.
  • Añadir [SOLUCIONADO] al título del primer mensaje de tu consulta cuando así lo consideres.
Post Reply

Return to “Tutorials”