Access to a Linux server from outside is only possible if you set up an SSH access. SSH, or Secure Shell, allows you to securely access your Linux server, which is especially useful when you don't need a graphical user interface or if you want to connect from another network. In this guide, you will learn how to install an SSH server on your Linux Ubuntu test machine and connect with various clients, such as Macintosh or Windows.
Key findings
- Installation of the SSH server on Ubuntu
- Connecting to a Linux server via SSH from different operating systems
- Need for the correct network settings
Step-by-step guide to installing the SSH server
First, you should ensure that you have set up your Ubuntu test machine correctly. You already have an Ubuntu installation in place and the network adapter should be set to "bridged" so that your virtual machine receives its own IP address on the network. Check this by going into the network settings of your virtual machine and ensure that the bridged adapter is enabled.

Step 1: Open terminal
Now open the terminal. You can find the terminal in the applications or by searching for "Terminal." The terminal is the command prompt where you can enter commands to install your SSH server.

Step 2: Install SSH server
The next step is to install the SSH server. Use the sudo command to obtain superuser privileges. Enter the following command:
Press Enter. You will be prompted to enter your password. After entering, the required package will be downloaded and installed. Once the installation is complete, you will be informed that the SSH server is now ready for use.

Step 3: Find the IP address of the Linux system
To connect to your Linux system, you need the IP address. Go to the network settings of your Ubuntu system to find out the current IP address. Note this address, as you will need it for the connection.

Step 4: Establish connection via a Mac
If you want to access from a Macintosh system, start the terminal. Here you can use the SSH command to connect. The command has the following format:
Replace "username" with your username and "ip-address" with the IP address of the Ubuntu system that you noted earlier. Confirm the command with Enter. When asked if you want to trust the connection, enter "yes" and press Enter.

Step 5: Establish connection via Windows
If you want to access your Linux system from a Windows computer, you need to download an external SSH client like PuTTY. Open your web browser and search for "PuTTY." Download the program and install it.

After installation, open PuTTY. In the "Host Name (or IP address)" field, enter the IP address of the Ubuntu system. Make sure the port is set to 22 (the default port for SSH) and click "Open."

In the window that opens, enter your username and after the prompt, enter your password. You are now connected to the Linux server and can perform all required tasks via the command line.

Step 6: Checking network settings
To ensure that you can access your Ubuntu test machine from the outside, it's important to check the network settings in your virtual machine manager. Make sure that the adapter is set to "bridged." Otherwise, you won't be able to access your machine from the outside.

Summary – Installing SSH Server on your Linux
An SSH connection allows you to securely access and manage your Linux server. This guide has shown you how to install the SSH server on Ubuntu and connect to your Linux system using both Macintosh and Windows. Be sure to make the correct network settings so that you can access it externally.
Frequently Asked Questions
What is SSH?SSH stands for Secure Shell and is a protocol for secure remote connection to a computer.
Why do I need an SSH server?An SSH server allows you to securely access your Linux server from external devices.
How do I find the IP address of my Linux system?Go to the network settings of your Ubuntu system to find out the IP address.
Do I need to change the port for SSH?By default, SSH uses port 22, which should not be changed in the latest installations unless there are specific security requirements.
What if the connection fails?Check the network settings of your virtual machine and ensure that the adapter is set to "bridged."