Beginning SSH on Ubuntu
May 29th, 2008
So let’s say you have a private LAN running in your secret underground lab. Maybe you’ve got a Linux box hardwired to a WiFi router, and maybe a Mac or Linux laptop floating around somewhere, and you need a quick way to transfer files or execute shell commands remotely.
What you need is SSH, the Secure Shell. SSH is a powerful tool which allows secure remote login over insecure networks. It provides an encrypted terminal session with strong authentication of both the server and client using public-key cryptography. This tutorial will cover the basics of SSH’s most useful features:
- Logging into a remote computer over a secure connection.
- Transferring files and directories between computers over a secure connection.
- Enabling public-key authentication.
- Passwordless authentication for use with scripts and cron jobs.
The following assumptions are made about the reader:
- You know what a terminal/command line/shell is and how to start a session.
- You have at least a basic familiarity with Linux/Mac command-line syntax.
- You’re on a private LAN with access to at least two Linux/Mac computers (or, you have a user account on a remote server that accepts SSH connections).
As always, comments, corrections, and suggestions for improvement are appreciated.
Installing OpenSSH
The Ubuntu (and MacOS X) flavor of SSH is called OpenSSH, a free, open-source implementation of the ssh protocol. It consists of two basic components, an openssh-client and an openssh-server. SSH clients communicate with SSH servers over encrypted network connections.





