How to perform ssh connection

来自百问网嵌入式Linux wiki


This article describes how to perform remote connection using the ssh[1] tool.

Perform ssh connection

On host PC, one can type:

If it is a first connection:

 PC $> ssh root@
 The authenticity of host ' (' can't be established.
 ECDSA key fingerprint is a0:a2:a3:09:b4:99:b3:90:6a:d0:35:05:6e:37:d0:6e.
 Are you sure you want to continue connecting (yes/no)? yes
 Warning: Permanently added '' (ECDSA) to the list of known hosts.


 PC $>ssh root@

<securetransclude src="ProtectedTemplate:ReviewsComments" params="-- Bernard Puel (talk) 11:53, 5 May 2020 (CEST)<br />Below section and reference are now obsolete as we are using dropbear on openstlinux for ssh client/server. At each ssh connection a systemd service is launch dedicated to this connection."></securetransclude>{{#set:Has reviews comments=true}}

If the below error message is showing, it means that sshd is not running on the target:

 PC $>ssh root@
 ssh: connect to host port 22: Connection refused
On stm32mp1, one can type:
 Board $>mkdir /var/run/sshd
 Board $>/etc/init.d/sshd restart
In the console, the following log should appear:
 Board $>mkdir /var/run/sshd
 Board $>/etc/init.d/sshd restart
   generating ssh RSA key...
   generating ssh ECDSA key...
   generating ssh DSA key...
   generating ssh ED25519 key...
 Restarting OpenBSD Secure Shell server: sshdno /usr/sbin/sshd found; none killed


  1. [1] ifconfig

<securetransclude src="ProtectedTemplate:PublicationRequestId" params="10178 | 2019-01-07 | BrunoB"></securetransclude>