Copyright © tekijänoikeus: Taleman, 2020.
Edited by – toimitustyö: Sananjalka, 2020-06.
This tutorial, aimed at Linux and Windows users, shows how to set up access to website files in the file manager application on your workstation.
I have been motivated to write a tutorial because it appears there is a lot of demand for integrating a file manager into ISPConfig. Since such a beast does not exist, I will describe another method to accomplish similar goals.
A workstation with a GUI has a file manager that allows browsing files, working with them, and starting applications, such as text editors, to manipulate any of them.
To get started, you should create a shell user for SSH connections, as well as an FTP user for FTP connections, both in the ISPConfig panel. An ISPConfig user is created for one website, and can access files of that website and only those. When creating your shell user, a so called jailed user is the recommendable choice.
[KÄSITETTÄ "jailed user" EI OIKEIN MISSÄÄN MÄÄRITELLÄ SELKEÄSTI JA YLEISPÄTEVÄSTI. LÖYTÄMÄÄNI PAREMPI SELITTÄVÄ LÄHDE VOISI OLLA HYVÄKSI.]
The following procedure has been tested on Ubuntu 18.04.
The screenshots below will guide you through the process. Start by mounting the desired website directory (i.e. remote host directory) on the file manager on your workstation (the "Files" icon in the left panel, marked with "1." in the first screenshot).
The "Other Locations" item (marked with "2." in the above screenshot) will open a popup window where a connection to the desired server (i.e. remote host) can be established.
If you intend to use this connection often, you would probably prefer not to type a password every time you open it. SSH keys, generated by ssh-keygen, will allow you to set up passwordless logins; for further information, see the "Links" section at the end of this tutorial.
Now you will be able to access the files on the remote server (in my examples, WordPress files) just as easily as those on the local disk of your workstation.
Disconnecting the SSH mount is done in the same way as unmounting any other mount, i.e. by clicking with the mouse on the "Unmount" button for the mounted device (which, in this case, happens to be a remote host).
This works just like with SSH, except that you have to use ftp:// as the protocol when connecting to the remote host.
Remember to insert the username and the password you created for your FTP user, not those you created for your SSH user! For an FTP connection, you will have to enter a password, passwordless login is not an option (except with anonymous FTP, but you should not use that for website FTP access).
Disconnecting the FTP mount is done in the same way as disconnecting the SSH mount (see the relevant paragraph above).
For good measure, I tested these procedures also on Debian 10, and everything worked out in the same way. To make sure nothing extra needs to be installed, I tested both an SSH connection and an FTP connection on a freshly installed default Ubuntu 20.04 as well, facing no complications.
The following procedure has been tested on Windows 10 (according to Winver, version 2004, OS build 19041.264).
Instructions for installing and using SSHFS on Windows can be found on GitHub. The "factory version" of Windows does not support SSHFS, so you will need to install extra components: winfsp and sshfs-win.
[TIETOKONEALAN AMMATTILAISISTA POIKETEN VIERASTAN ERISNIMIEN, ESIMERKIKSI OHJELMANNIMIEN TAI VERKKOSIVUJEN OTSIKOITTEN, KIRJOITTAMISTA PIENELLÄ ALKUKIRJAIMELLA. TOISAALTA KOKONAAN PIENISTÄ KIRJAIMISTA (GEMENASTA) KOOSTUVA ASU ON ILMAN MUUTA PERUSTELTU AINAKIN SILLOIN, JOS ERISNIMEN KIRJOITTAMINEN "OIKEIN" JOHTAISI LUKIJAA TODENNÄKÖISESTI HARHAAN, ESIMERKIKSI KIRJOITTAMAAN LINUX/UNIX-KOMENNON TAI KÄYTTÄJÄTUNNUKSEN VIRHEELLISESTI. LINKISSÄSI ANNETTU VERKKOSIVUN OTSIKKO "sshfs-win" MIETITYTTI MINUA TÄSTÄ SYYSTÄ, JA LISÄKSI OLIN KIINNOSTUNUT SAAMAAN YLEISKUVAN SEN TARJOAMASTA OHJEISTUKSESTA. SIVUN TARKASTELEMINEN EI KUITENKAAN ONNISTUNUT, SILLÄ ANTAMASI URL-OSOITE OHJASI SELAIMEN SIVULLE Contribute to Howtoforge Linux Tutorials. TURVAUDUIN ARVAUKSEEN JA KORJASIN OSOITTEEN. – ALKUTEKSTIN LINKKIKOODISSA OLI MYÖS MIELESTÄNI TARPEETTOMAT OSUUDET "target" ja "title", JOTKA POISTIN, TÄSTÄ JA MUUALTA, KÄYTTÄEN YKSINKERTAISINTA TUNTEMAANI LINKKIKOODIA.]
Read the instructions for SSHFS for Windows and follow them, first to install the necessary components and then to use the correct UNC syntax for the connection.
Note: Using \\sshfs\user@host will show you only the home directory of the shell user, with no way to access the website files. Thus using the correct syntax –
\\sshfs.r\user@host\web
– is really important for a website shell user on Windows.
The screenshots below are from the Finnish-language version of Windows 10.
Once the connection has been established, Windows File Manager will show the files on the remote server (in my examples, WordPress files) like this:
Disconnecting: by clicking with the right mouse button on the remote host item on the left panel of the file manager, you will get a popup with the "Disconnect" function.
[OLETAN, ETTÄ ALKUTEKSTIN "the item on left panel") TARKOITTI ETÄPALVELIMEN KUVAKETTA JA OSOITETTA, MUTTA ALUKSI OLIN EPÄVARMA. MIKÄLI OLETUKSENI OLI OIKEA, EI TÄSMENNYKSESTÄ LIENE HAITTAA. ALKUTEKSTIKIN VÄÄNTÄÄ ERÄITÄ TOISIA ASIOITA RAUTALANGASTA SITEN, ETTÄ SE TUNTUU JOPA MINUSTA ERITTÄIN PERUSTEELLISELTA.]
An FTP connection on Windows 10 File Manager proved to be the most difficult one to set up, and did not work very well; I advise against using it if any of the other methods is available. Nevertheless, I did get it to work to some extent, by following instructions from Connect to FTP Site Server Using File Explorer for Windows 10.
It seems to me that, unlike with the other methods I have presented, this FTP connection is not done by mounting. Instead, the file manager behaves like it is just an FTP client, and a poor one at that. (FileZilla is free and a lot easier to work with; in case you are interested in installing it, see the "Links" section of this tutorial.)
If an FTP connection of this type is used, apparently the hostname used in the UNC (see the Windows SSH paragraph above) must be included in the certificate of the FTP server.
While compiling this tutorial, I did not have access to other operating systems, such as macOS 10.15. My guess is that similar methods will work on all modern operating systems used on workstations.
• Password-less Logins with OpenSSH (using SSH keys for login)
• Secure Passwordless Logins with SSH
• Connect to FTP Site Server Using File Explorer for Windows 10
• FileZilla (a free FTP client)