If you need to connect to a remote server, SSH is the best way to do it. Users who have a Chromebook can use SSH as well. Setting it up is easy and only takes a few clicks.
Using the Chrome SSH Extension
The simplest way to set up SSH on your Chromebook is by installing the Secure Shell extension. This extension supersedes the Chrome SSH app. While the latter is still available for Chromebook users on the Web Store, it will go away for regular users in 2021 and enterprise users in 2022.
Instead, you can install the Secure Shell Chrome extension. It works like the old app and any other remote terminal apps like PuTTY, which you might have used on Windows.
To set up the connection, click the Secure Shell logo and a menu will pop up. Click the Connect Dialog option. A menu will appear asking you to enter the parameters that you’ll use to connect to your server, including the address of the server and your username. If you’ve created an SSH key on another computer, you can import it using the Import button.
Once you’ve filled in your information and successfully logged in to your remote server, you can start your connection anytime by clicking on it from the menu.
This extension also supports Mosh sessions. Mosh is great because you can stay connected even when your wireless connection drops or you close your laptop. Just click the stylized Mosh option and a menu similar to the connection setup menu will be displayed. Just put in the same information and you’ll have a Mosh connection from your browser.
SSH Under Linux
A more flexible option on a Chromebook is to use SSH under Linux if your device supports it. This way, you won’t have to rely on any browser extension for connecting to a remote server.
If you haven’t already set up the Linux environment under Chrome OS, open Settings and go to Developers > Linux Development Environment (beta). Chrome OS will set up a Debian Linux environment known as Crostini.
This system already has the SSH client installed by default. To log into your server, use the same commands as you would do on any other Linux command line:
Just replace user and server with your username and the address of the server you’re trying to connect to. If your username on your local machine and the remote machine are the same, you can omit the username, as SSH will just assume that your local username is the same on the remote server.
Generating an SSH Key
One of the most powerful features of SSH is the ability to generate a public/private key pair that lets you log into your remote server securely than just using a password alone.
The key pair works on the principle of a private and public key. The private key is unique to your computer and stays on your machine. You should keep it private. On the other hand, you can copy the public key to remote servers.
To generate a key, type:
This will create the key pair. You’ll also be prompted to enter a passphrase. It should be more complex than a password. Alternatively, you can just leave it blank.
To copy the public key to the server, use the ssh-copy-id command:
ssh-copy-id server user@server
You can manually copy and paste your public key on the remote server as well. Your public key is located at .ssh/id_rsa.pub. Copy the contents of this file to .ssh/authorized_keys file on the remote server. Using ssh-copy-id is much easier and faster than manually copying the key pair.
You’ll then be able to log in to the server with your passphrase. If you opted to leave the passphrase blank, you’ll be able to log in without a password.
You Can SSH from Your Chromebook
You now know how to log into a remote server with SSH from a Chromebook by either using a browser extension or with the standard SSH client in Linux.
To unleash the real power of remote sessions, you can set up Mosh and Tmux together. This will not only make remote computing much easier but will also allow you to run terminal processes without worrying about them.
Read the full article here