“How to perform ssh connection”的版本间的差异
来自百问网嵌入式Linux wiki
Zhouyuebiao(讨论 | 贡献) |
|||
(未显示同一用户的2个中间版本) | |||
第1行: | 第1行: | ||
== Purpose == | == Purpose == | ||
− | + | 本文介绍如何使用'''ssh'''<ref>[https://linux.die.net/man/8/ifconfig] ifconfig</ref>工具执行远程连接。 | |
=== Perform ssh connection === | === Perform ssh connection === | ||
− | :: | + | ::在主机PC上,用户可以输入: |
− | + | 如果是第一次连接: | |
{{PC$}} ssh root@10.48.1.172 | {{PC$}} ssh root@10.48.1.172 | ||
The authenticity of host '10.48.1.172 (10.48.1.172)' can't be established. | The authenticity of host '10.48.1.172 (10.48.1.172)' can't be established. | ||
第11行: | 第11行: | ||
Warning: Permanently added '10.48.1.172' (ECDSA) to the list of known hosts. | Warning: Permanently added '10.48.1.172' (ECDSA) to the list of known hosts. | ||
root@(none):~# | root@(none):~# | ||
− | + | 除此以外: | |
{{PC$}}ssh root@10.48.1.172 | {{PC$}}ssh root@10.48.1.172 | ||
root@(none):~# | root@(none):~# | ||
− | + | 如果显示以下错误消息,则表明sshd不在目标上运行: | |
− | |||
− | |||
{{PC$}}ssh root@10.48.1.172 | {{PC$}}ssh root@10.48.1.172 | ||
ssh: connect to host 10.48.1.172 port 22: Connection refused | ssh: connect to host 10.48.1.172 port 22: Connection refused | ||
− | :: | + | ::在stm32mp1上,可以输入: |
{{Board$}}mkdir /var/run/sshd | {{Board$}}mkdir /var/run/sshd | ||
{{Board$}}/etc/init.d/sshd restart | {{Board$}}/etc/init.d/sshd restart | ||
− | :: | + | ::在控制台中,应显示以下日志: |
{{Board$}}mkdir /var/run/sshd | {{Board$}}mkdir /var/run/sshd | ||
{{Board$}}/etc/init.d/sshd restart | {{Board$}}/etc/init.d/sshd restart | ||
第35行: | 第33行: | ||
==References== | ==References== | ||
<references /> | <references /> | ||
− | |||
− | |||
− | |||
− | |||
− |
2020年11月6日 (五) 14:35的最新版本
Purpose
本文介绍如何使用ssh[1]工具执行远程连接。
Perform ssh connection
- 在主机PC上,用户可以输入:
如果是第一次连接:
PC $> ssh root@10.48.1.172 The authenticity of host '10.48.1.172 (10.48.1.172)' 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 '10.48.1.172' (ECDSA) to the list of known hosts. root@(none):~#
除此以外:
PC $>ssh root@10.48.1.172 root@(none):~#
如果显示以下错误消息,则表明sshd不在目标上运行:
PC $>ssh root@10.48.1.172 ssh: connect to host 10.48.1.172 port 22: Connection refused
- 在stm32mp1上,可以输入:
Board $>mkdir /var/run/sshd Board $>/etc/init.d/sshd restart
- 在控制台中,应显示以下日志:
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