From the course: Learning VPN

Configuring an SSH server

From the course: Learning VPN

Start my 1-month free trial

Configuring an SSH server

- [Instructor] In order to set up an SSH server on a Linux system, we can install the openssh-server package. Similar packages are available for other operating systems. Once openssh-server is installed, there's just a little bit more we need to do in order to allow the server to act as an endpoint for a tunnel. We'll need to open up tcp port 22 on the server's firewall, if it's not already open. And make sure that the port we open up is also accessible from outside the edge firewall, if it's protected in that way. Regular users with local accounts on the server will be able to connect via SSH, and, if you need other users, like from a directory, you'll need to configure the relevant modules to make that happen. In the SSHD configuration file, you can control whether certain existing users are blocked from connecting, too. SSH users can create a tunnel to forward a port on the server, or on a system on the server's network to a local port on their system. That can be useful for working with a database, or another application that runs on a particular port. Another option for the user is to configure SSH to provide a proxy, which they can use to send web traffic through the SSH connection so it appears to be coming from wherever the server is located. This can be useful to make traffic appear to be coming from somewhere else. Or, it can be used simply to secure the web browsing traffic from observers on the local network. Openssh and some other SSH packages can act as a SOCKS proxy. As I mentioned earlier, there's not too much server site setup to do to allow clients to use SSH to send traffic securely. So let's switch to a client and see how to use SSH forwarding to protect traffic.

Contents