Copy Link
Add to Bookmark
Report

Simple SSH Installation

SSH (Secure Shell) is a protocol that is used to remotely connect to another computer running an SSH server. The standard interface is a simple command line, although you can also run graphical (X11) applications on a Linux or BSD server. Below, we will cover setting up a client, server, and connecting the two.

eZine's profile picture
Published in 
Full Circle Magazine
 · 12 Jan 2023

Written by Rob Kerfia

Setting up a server

1 Launch Synaptic (or Adept if you use Kubuntu) System > Administration > Synaptic Package Manager and enter your password.

Simple SSH Installation
Pin it

2 Search for the "openssh-server" package and click on the empty checkbox. Choose "Mark for Installation" from the menu.

Simple SSH Installation
Pin it

3 Repeat the above step for the package "inadyn". (This will come in handy later.)

Simple SSH Installation
Pin it

4 When asked "Apply the following changes?", click Apply.

5 The package should install. Click "Close" and quit Synaptic.

Now you have a server installed! You might be wondering what you can do with it. Well, you can do a lot of things - from remote file transfers to running applications on your computer from another one. Before you can do that, though, there are a few more steps. First, you have to know how to connect to your computer remotely. First let's set up a dynamic DNS account so you can access your computer via an easy to remember subdomain, not a lengthy IP address.

1. Go to www.dyndns.com and click "Create Account" underneath the login box at the top of the page.

2. Choose a username, password, and all the rest of that nice stuff.

Simple SSH Installation
Pin it

3. Confirm your account with the email they sent you and log in.

4. Click the "My Services" link and choose "Add New Hostname" on the new page that comes up.

5. Choose a hostname, subdomain, and click the auto-detected remote IP link underneath the "IP Address" field. Click "Create New Host".

6. Next, go to your terminal and type:

gksudo gedit /etc/crontab

press Enter and then type in your password.

7. Type in

0 * * * * inadyn -u your_username -p your_password -a name.you.registered > /dev/null

all on one line. I can't stress this enough - don't delete or change anything else.

8. Save and quit.

9. You should be able to access your computer via the domain you registered in about an hour.

To connect to your computer, simply type in:

ssh [username]@[registered.subdomain]

from a terminal. The first time you connect from a particular machine, you might get a message saying "The authenticity of host [subdomain] (IP address) can't be established." You can safely ignore this - type "yes." Next, you should be prompted for a password. If you enter that correctly, you should be at a command line prompt - on your computer!

Some neat tricks you can use with SSH:

Run graphical applications

Type:

ssh -X username@subdomain

at a terminal. Enter your password like normal. Now, type in the name of a graphical application at the command prompt (like "nautilus" or "thunar"). It should show up on the computer you're at, except it's running on your computer.

Copy files

Type:

scp username@subdomain:/path/to/file username_for_comp_you're_at@localhost:~/

and this will copy the file into your home folder.

← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos App from Google Play
install Neperos as PWA

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT