我进行到第 5 步,但在显示命令脚本以及通过 SSH 连接到 Pi 时遇到了问题。
根据说明,我使用以下 SSH 凭据:ssh root@ 192.168.0.10
和标准密码:root
这是我得到的输出ssh -v host:
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 102: Applying options for *
debug1: Connecting to 192.168.0.10 [192.168.0.10] port 22.
debug1: connect to address 192.168.0.10 port 22: Operation timed out ssh: connect to host 192.168.0.10 port 22: Operation timed out
Connors-MacBook-Pro:~ Connor$
答案1
看起来机器没有侦听端口 22,或者您尝试使用错误的 IP 地址进行 ssh 登录。
尝试为侦听 SSH 端口 22 的计算机映射 LAN:
使用 nmap 进行映射的命令:
nmap -p 22 --open -sV 192.168.1.0/24
看起来您也认为它将位于 192.168.0.something 上,所以也尝试一下:
nmap -p 22 --open -sV 192.168.0.0/24
这是我的输出,其中 192.168.1.7 是我的 Pi:
treddell@laptop:~$ nmap -p 22 --open -sV 192.168.1.0/24
Starting Nmap 5.21 ( http://nmap.org ) at 2015-08-18 15:10 MST
Nmap scan report for WL.ph.cox.net (192.168.1.1)
Host is up (0.0012s latency).
The 1 scanned port on WL.ph.cox.net (192.168.1.1) is closed
Nmap scan report for 192.168.1.5
Host is up (0.093s latency).
The 1 scanned port on 192.168.1.5 is closed
Nmap scan report for 192.168.1.6
Host is up (0.00015s latency).
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 5.9p1 Debian 5ubuntu1.6 (protocol 2.0)
Service Info: OS: Linux
Nmap scan report for 192.168.1.7
Host is up (0.061s latency).
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 6.0p1 Debian 4+deb7u2 (protocol 2.0)
Service Info: OS: Linux
Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 256 IP addresses (4 hosts up) scanned in 3.97 seconds
一旦你确定了它的 IP 地址,就可以使用这个命令:
将 x 替换为您找到的数字。请注意,我会避免使用“@”后面的空格。