Installation of SSH

Installation of the OpenSSH

To install the OpenSSH client applications on your Linux system, use this command at a terminal prompt:

sudo apt-get update
sudo apt-get install openssh-client

To install the OpenSSH server application, and related support files, use this command at a terminal prompt:

apt-get update
sudo apt-get install openssh-server

Setting up passwordless ssh

On the Embedded Linux board

First install OpenSSH:

apt-get install openssh-server

Create a key pair:

ssh-keygen -t rsa

The keys are stored in the hidden .ssh/ directory in your home directory. ssh-keygen generate a private and an public key.
Change directory permissions if needed:

chmod 700 ~/.ssh

On the local Linux (Ubuntu) machine

First install OpenSSH:

apt-get install openssh-server

Create a key pair:

ssh-keygen -t rsa

The keys are stored in the hidden .ssh/ directory in your home directory. ssh-keygen generate a private and an public key.
Change directory permissions if needed:

chmod 700 ~/.ssh

Copy the public key to the embedded Linux board:

scp ~:/.ssh/id_rsa.pub gnublin@192.168.1.1:~/.ssh/authorized_keys

Login into the remote host (Embedded Linux board) and change file permissions if needed:

ssh -l ubuntuuser gnublin
Password: ********
chmod 0600 ~/.ssh/authorized_keys

Logout:

logout

Now use ssh to connect passwordless to the embedded Linux board!

ssh root@192.168.1.150

 


 

Add new comment