Difference between revisions of "SSHFS"
(18 intermediate revisions by 5 users not shown) | |||
Line 2: | Line 2: | ||
In computing, '''[https://wiki.teltonika-networks.com/view/RUT950_SSHFS SSHFS]''' (SSH Filesystem) is a filesystem client to mount and interact with directories and files located on a remote server or workstation over a normal SSH connection. The client interacts with the remote file system via the SSH File Transfer Protocol (SFTP), a network protocol providing file access, file transfer, and file management functionality over any reliable data stream that was designed as an extension of the Secure Shell protocol (SSH) version 2.0. | In computing, '''[https://wiki.teltonika-networks.com/view/RUT950_SSHFS SSHFS]''' (SSH Filesystem) is a filesystem client to mount and interact with directories and files located on a remote server or workstation over a normal SSH connection. The client interacts with the remote file system via the SSH File Transfer Protocol (SFTP), a network protocol providing file access, file transfer, and file management functionality over any reliable data stream that was designed as an extension of the Secure Shell protocol (SSH) version 2.0. | ||
− | '''Note:''' For Teltonika devices, SSHFS can be installed from the ''' | + | '''Note:''' For Teltonika devices, SSHFS can be installed from the '''Services → [[RUT950 Package Manager|Package Manager]]''' as an additional package. |
== Configuration overview and prerequisites == | == Configuration overview and prerequisites == | ||
Line 9: | Line 9: | ||
'''Prerequisites:''' | '''Prerequisites:''' | ||
− | + | · Any Rut or TRB device | |
− | + | ||
− | + | · Ubuntu Linux machine to host OpenSSH server | |
+ | |||
+ | · Virtual box or VMware to install the Ubuntu Linux machine | ||
We will be testing this feature over local network '''192.168.0.0/24'''. For you, if you want to test it over '''WAN''', your SSH Server machine needs to be accessible via '''Public IP or Hostname''' over the WAN network. | We will be testing this feature over local network '''192.168.0.0/24'''. For you, if you want to test it over '''WAN''', your SSH Server machine needs to be accessible via '''Public IP or Hostname''' over the WAN network. | ||
== Configuration Scheme == | == Configuration Scheme == | ||
− | |||
− | In the picture, configuration scheme of this example has been displayed. RUT device is connected to the Ubuntu VM machine locally. | + | [[File:ConfigurationScheme.png|center|thumb|644x644px]]In the picture, configuration scheme of this example has been displayed. RUT device is connected to the Ubuntu VM machine, which is connected locally to the router. |
== Ubuntu VM Installation and Configuration == | == Ubuntu VM Installation and Configuration == | ||
Line 26: | Line 27: | ||
1. Get the Ubuntu Linux OS Desktop image from [https://ubuntu.com/download here] | 1. Get the Ubuntu Linux OS Desktop image from [https://ubuntu.com/download here] | ||
− | 2. Install the image in the virtual box application. Make sure | + | 2. Install the image in the virtual box application. Make sure to Ubuntu machine is perfectly running and put the machine in the same network as that of the router. For this, go to network settings option of the virtual machine and select Bridged Adapter and select the same adapter to which your Teltonika router is connected. |
− | + | [[File:BridgedAdapter.png|center|thumb|465x465px]] | |
− | + | 3. To verify your VM network, go to Settings-> Network option on the Ubuntu VM. | |
− | + | [[File:Networksettings.png|center|thumb|477x477px]] | |
− | 3. To verify your VM network, go to Settings-> Network option on the Ubuntu VM.[[File: | + | Here you can see that over machine is in network of 192.168.0.0/24, which is same as the LAN network of the router. If VM doesn’t show router network range IP, try to turn OFF the adapter on the same settings option as above picture and then turn it ON again. |
− | |||
− | |||
− | |||
− | Here you can see that | ||
4. Next, we need to install OpenSSH package in the Ubuntu machine. Open the terminal and issue the following commands: | 4. Next, we need to install OpenSSH package in the Ubuntu machine. Open the terminal and issue the following commands: | ||
Line 47: | Line 44: | ||
sudo systemctl status ssh | sudo systemctl status ssh | ||
Result of the above command should be like this: | Result of the above command should be like this: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 17:58, 21 April 2022
Introduction
In computing, SSHFS (SSH Filesystem) is a filesystem client to mount and interact with directories and files located on a remote server or workstation over a normal SSH connection. The client interacts with the remote file system via the SSH File Transfer Protocol (SFTP), a network protocol providing file access, file transfer, and file management functionality over any reliable data stream that was designed as an extension of the Secure Shell protocol (SSH) version 2.0.
Note: For Teltonika devices, SSHFS can be installed from the Services → Package Manager as an additional package.
Configuration overview and prerequisites
Before we begin, let's overview the configuration that we are attempting to achieve and the prerequisites that make it possible.
Prerequisites:
· Any Rut or TRB device
· Ubuntu Linux machine to host OpenSSH server
· Virtual box or VMware to install the Ubuntu Linux machine
We will be testing this feature over local network 192.168.0.0/24. For you, if you want to test it over WAN, your SSH Server machine needs to be accessible via Public IP or Hostname over the WAN network.
Configuration Scheme
In the picture, configuration scheme of this example has been displayed. RUT device is connected to the Ubuntu VM machine, which is connected locally to the router.
Ubuntu VM Installation and Configuration
As mentioned above, VM of Ubuntu Linux is required to host the OpenSSH server. OpenSSH server will allow the Teltonika router to access Ubuntu machine’s filesystem over SSH connection.
1. Get the Ubuntu Linux OS Desktop image from here
2. Install the image in the virtual box application. Make sure to Ubuntu machine is perfectly running and put the machine in the same network as that of the router. For this, go to network settings option of the virtual machine and select Bridged Adapter and select the same adapter to which your Teltonika router is connected.
3. To verify your VM network, go to Settings-> Network option on the Ubuntu VM.
Here you can see that over machine is in network of 192.168.0.0/24, which is same as the LAN network of the router. If VM doesn’t show router network range IP, try to turn OFF the adapter on the same settings option as above picture and then turn it ON again.
4. Next, we need to install OpenSSH package in the Ubuntu machine. Open the terminal and issue the following commands:
sudo apt update
sudo apt-get install openssh-server
Now, enable the SSH service, and start it.
sudo systemctl enable ssh
sudo systemctl start ssh
Check the status of the SSH service with below command:
sudo systemctl status ssh
Result of the above command should be like this: