Homepage Wiki Forum Buy

SSH administration

From GNUBLIN

Secure Shell (SSH) is a network protocol which supports secure connection between computers. You are going to connect to the terminal of the other machine so you can use the terminal like you are in front of the machine. It is also possible to transfer data over this connection.

SSH

In order to use SSH for a connection to your GNUBLIN there has to run the SSH-Server on the GNUBLIN. Normally the SSH-Server runs per default. You can check this:

root@gnublin:~# ps aux | grep ssh

Before you can use SSH there has to be set a password for the user root on the GNUBLIN. This comman sets a new one:

root@gnublin:~ passwd

Now you are ready to connect all you need is the IP-Address of the GNUBLIN. You can look it up on the GNUBLIN with the ifconfig-command.

On the host-machine has to run the ssh-client. On the most Linux-Distribution like Ubuntu this service is already installed and running.

For a connection you only have to type this:

user@develop-pc:~# ssh root@192.168.0.10

Yo u have to use the right IP-Address of your GNUBLIN of course.

By the first connection you will be asked if you want to accept the SSH-key of the GNUBLIN you have to confirm that with yes. After the password request you are connected to the GNUBLIN.

To close the connection use the command exit:

root@gnublin:~# exit

SSH without password

You can set it up, so that you won't need a password for ssh and scp. You have to do following:

on the development pc:

ssh-keygen

Then a key pair is generated. Optionally, you can protect the key pair with a password. If the key is generated, you must transfer the public key on the board.

ssh-copy-id root@192.168.0.100

bzw. muss man statt der 192.168.0.100 die IP-Adresse des GNUBLIN Boards eintragen. Jetzt muss man noch das letzte mal das Passwort von GNUBLIN eingeben. Anschliessend kann man jederzeit mit

You have to insert instead of 192.168.0.100 the IP address of GNUBLIN board. Now you must enter the password of GNUBLIN a the last time. Then you are able to connect at any time with

ssh root@192.168.0.100

to your board without password.

SCP

SCP is used for the file transfer over a SSH-Connection. You dont have to be connected to the GNUBLIN like described before only the SSH-Server has to run on the board.

The scp-command looks similar to the cp-command:

scp sourcefile.bsp User@Host:directory/targetfile.bsp

When you use it it looks like this:

user@develop-pc:~# scp examplefile.txt root@192.168.0.10:

You have to use the right IP-Address of course.

You set the target-directory after the colon. If you don't mention a directory the file is transferred to the home-directory of the user in this case /root.

This method works also in the other direction (GNUBLIN to developmachine). The only requirement is that a SSH-Server is runing on the developmachine:

root@gnublin:~# scp beispiel.txt user@192.168.0.5:
In other languages