当前位置:   article > 正文

Jetson Orin(Ubuntu20.04)反馈SSH远程别的设备可以成功,别的设备无法登录本机设备_ssh.service: start request repeated too quickly.

ssh.service: start request repeated too quickly.

硬件设备,Jetson Orin设备

Jetpack 版本5.0.2

这样的问题一般都是本机的权限问题,看下你本机的配置

测一下登录本机ssh nvidia@127.0.0.1
ssh: connect to host 127.0.0.1 port 22: Connection refused目前是禁止连接的。

正常是可以登录的。如下图:

 

 接下来的操作都是在修复jetson无法ssh登录的问题。

 sudo apt-get install openssh-server openssh-client

sudo apt-get install ufw

sudo ufw enable 

 这个时候还没想到直接下载iptables

 

如上图是在摸索,下面是正确的下载方式。

 

 继续查看22号端口的状态

sudo ufw allow 22  

lsof -i:22

sudo netstat -nltp | grep 22

到此只是解决了防火墙的使用问题。继续测试能否登录。如下,发现了红色报错部分。

下面是正确22号端口的状态

sshd -T

提示sshd: no hostkeys available – exiting.

 又做了如下操作。

 ubuntu下sshd: no hostkeys available -- exiting.

今天使用

/usr/sbin/sshd

代码想启动ssh,结果一直报错,一直报错,找寻各种方法无果。后来找安装教程,发现人用的是

ssh-keygen -t rsa

试了下,直接启动。如果你搜到这个问题,看看是不是也是这个情况。

  1. systemctl stop ssh.service //关闭由systemctl控制的ssh启动
  2. rm /lib/systemd/system/ssh.service //删除ssh的服务配置文件
  3. systemctl daemon-reload //重载systemctl服务
  4. systemctl start ssh.service //重启服务

 到此还是无法正常使用,接着试吧。

 如下这个操作其实和我的错误没有关系,记录一下。

 按照朋友的方法最后忘了在哪看的,输入sudo dpkg-reconfigure openssh-server就可以了,然而对我的错误还是没有解决,不过还是要记录一下,看到这你别骂我,多记录总归是个回忆。

脑回路一转又撞到了防护墙,真实要撞南墙的节奏。

 发现开着也接受22号,不行就关了防护墙接受把,接着试试。

 

 我最后打开了22号端口,添加ubuntu22.04解决ssh登录,找不到匹配的host key算法,添加如下两行内容

  1. HostKeyAlgorithms +ssh-rsa
  2. PubkeyAcceptedKeyTypes +ssh-rsa

sudo vim /etc/ssh/sshd_config 这是别人打开的配置文件,

我少打了一个字母添加到了sudo vi /etc/ssh/ssh_config,打开了22号注释,不过也能用了哈哈

 sudo systemctl restart sshd 

到此,可以登录了,果然无证驾驶又出了绕了弯路,欢迎大佬指点!

如下是系统问题无法SSH登录全过程终端操作命令历史记录,一般按照上面的过程安装一遍即可。

  1. nvidia@tegra-ubuntu:~/Desktop$ sudo apt-get install ip6tables-persistent
  2. [sudo] password for nvidia:
  3. Reading package lists... Done
  4. Building dependency tree
  5. Reading state information... Done
  6. E: Unable to locate package ip6tables-persistent
  7. nvidia@tegra-ubuntu:~/Desktop$ sudo apt-get install iptables-persistent
  8. Reading package lists... Done
  9. Building dependency tree
  10. Reading state information... Done
  11. The following additional packages will be installed:
  12. netfilter-persistent
  13. The following NEW packages will be installed:
  14. iptables-persistent netfilter-persistent
  15. 0 upgraded, 2 newly installed, 0 to remove and 324 not upgraded.
  16. Need to get 13.8 kB of archives.
  17. After this operation, 89.1 kB of additional disk space will be used.
  18. Do you want to continue? [Y/n] y
  19. Get:1 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 netfilter-persistent all 1.0.14ubuntu1 [7,268 B]
  20. Get:2 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 iptables-persistent all 1.0.14ubuntu1 [6,552 B]
  21. Fetched 13.8 kB in 1s (16.6 kB/s)
  22. debconf: delaying package configuration, since apt-utils is not installed
  23. Selecting previously unselected package netfilter-persistent.
  24. dpkg: warning: files list file for package 'openssh-server' missing; assuming package has no files currently installed
  25. (Reading database ... 147380 files and directories currently installed.)
  26. Preparing to unpack .../netfilter-persistent_1.0.14ubuntu1_all.deb ...
  27. Unpacking netfilter-persistent (1.0.14ubuntu1) ...
  28. Selecting previously unselected package iptables-persistent.
  29. Preparing to unpack .../iptables-persistent_1.0.14ubuntu1_all.deb ...
  30. Unpacking iptables-persistent (1.0.14ubuntu1) ...
  31. Setting up netfilter-persistent (1.0.14ubuntu1) ...
  32. Created symlink /etc/systemd/system/multi-user.target.wants/netfilter-persistent.service → /lib/systemd/system/netfilter-persistent.service.
  33. Setting up iptables-persistent (1.0.14ubuntu1) ...
  34. update-alternatives: using /lib/systemd/system/netfilter-persistent.service to provide /lib/systemd/system/iptables.service (iptables.service) in auto mode
  35. Processing triggers for man-db (2.9.1-1) ...
  36. Processing triggers for systemd (245.4-4ubuntu3.17) ...
  37. nvidia@tegra-ubuntu:~/Desktop$ sudo netstat -nltp | grep 22
  38. nvidia@tegra-ubuntu:~/Desktop$ sudo apt-get install ufw
  39. Reading package lists... Done
  40. Building dependency tree
  41. Reading state information... Done
  42. ufw is already the newest version (0.36-6ubuntu1).
  43. 0 upgraded, 0 newly installed, 0 to remove and 324 not upgraded.
  44. nvidia@tegra-ubuntu:~/Desktop$ sudo ufw enable
  45. Firewall is active and enabled on system startup
  46. nvidia@tegra-ubuntu:~/Desktop$ sudo ufw allow 22
  47. Skipping adding existing rule
  48. Skipping adding existing rule (v6)
  49. nvidia@tegra-ubuntu:~/Desktop$

  1. sudo apt-get install iptables-persistent
  2. Reading package lists... Done
  3. Building dependency tree
  4. Reading state information... Done
  5. The following additional packages will be installed:
  6. netfilter-persistent
  7. The following NEW packages will be installed:
  8. iptables-persistent netfilter-persistent
  9. 0 upgraded, 2 newly installed, 0 to remove and 324 not upgraded.
  10. Need to get 13.8 kB of archives.
  11. After this operation, 89.1 kB of additional disk space will be used.
  12. Do you want to continue? [Y/n] y
  13. Get:1 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 netfilter-persistent all 1.0.14ubuntu1 [7,268 B]
  14. Get:2 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 iptables-persistent all 1.0.14ubuntu1 [6,552 B]
  15. Fetched 13.8 kB in 1s (16.6 kB/s)
  16. debconf: delaying package configuration, since apt-utils is not installed
  17. Selecting previously unselected package netfilter-persistent.
  18. dpkg: warning: files list file for package 'openssh-server' missing; assuming package has no files currently installed
  19. (Reading database ... 147380 files and directories currently installed.)
  20. Preparing to unpack .../netfilter-persistent_1.0.14ubuntu1_all.deb ...
  21. Unpacking netfilter-persistent (1.0.14ubuntu1) ...
  22. Selecting previously unselected package iptables-persistent.
  23. Preparing to unpack .../iptables-persistent_1.0.14ubuntu1_all.deb ...
  24. Unpacking iptables-persistent (1.0.14ubuntu1) ...
  25. Setting up netfilter-persistent (1.0.14ubuntu1) ...
  26. Created symlink /etc/systemd/system/multi-user.target.wants/netfilter-persistent.service → /lib/systemd/system/netfilter-persistent.service.
  27. Setting up iptables-persistent (1.0.14ubuntu1) ...
  28. update-alternatives: using /lib/systemd/system/netfilter-persistent.service to provide /lib/systemd/system/iptables.service (iptables.service) in auto mode
  29. Processing triggers for man-db (2.9.1-1) ...
  30. Processing triggers for systemd (245.4-4ubuntu3.17) ...
  31. nvidia@tegra-ubuntu:~/Desktop$ sudo netstat -nltp | grep 22
  32. nvidia@tegra-ubuntu:~/Desktop$ sudo apt-get install ufw
  33. Reading package lists... Done
  34. Building dependency tree
  35. Reading state information... Done
  36. ufw is already the newest version (0.36-6ubuntu1).
  37. 0 upgraded, 0 newly installed, 0 to remove and 324 not upgraded.
  38. nvidia@tegra-ubuntu:~/Desktop$ sudo ufw enable
  39. Firewall is active and enabled on system startup
  40. nvidia@tegra-ubuntu:~/Desktop$ sudo ufw allow 22
  41. Skipping adding existing rule
  42. Skipping adding existing rule (v6)
  43. nvidia@tegra-ubuntu:~/Desktop$ ssh nvidia@127.0.0.1
  44. ssh: connect to host 127.0.0.1 port 22: Connection refused
  45. nvidia@tegra-ubuntu:~/Desktop$ service sshd restart
  46. Job for ssh.service failed because the control process exited with error code.
  47. See "systemctl status ssh.service" and "journalctl -xe" for details.
  48. nvidia@tegra-ubuntu:~/Desktop$ sudo service sshd restart
  49. Job for ssh.service failed because the control process exited with error code.
  50. See "systemctl status ssh.service" and "journalctl -xe" for details.
  51. nvidia@tegra-ubuntu:~/Desktop$ systemctl status ssh.service
  52. ● ssh.service - OpenBSD Secure Shell server
  53. Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
  54. Active: failed (Result: exit-code) since Tue 2023-04-04 09:30:00 UTC; 19s ago
  55. Docs: man:sshd(8)
  56. man:sshd_config(5)
  57. Process: 4358 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=1/FAILURE)
  58. Apr 04 09:30:00 tegra-ubuntu systemd[1]: ssh.service: Scheduled restart job, restart counter is at 5.
  59. Apr 04 09:30:00 tegra-ubuntu systemd[1]: Stopped OpenBSD Secure Shell server.
  60. Apr 04 09:30:00 tegra-ubuntu systemd[1]: ssh.service: Start request repeated too quickly.
  61. Apr 04 09:30:00 tegra-ubuntu systemd[1]: ssh.service: Failed with result 'exit-code'.
  62. Apr 04 09:30:00 tegra-ubuntu systemd[1]: Failed to start OpenBSD Secure Shell server.
  63. Apr 04 09:30:07 tegra-ubuntu systemd[1]: ssh.service: Start request repeated too quickly.
  64. Apr 04 09:30:07 tegra-ubuntu systemd[1]: ssh.service: Failed with result 'exit-code'.
  65. Apr 04 09:30:07 tegra-ubuntu systemd[1]: Failed to start OpenBSD Secure Shell server.
  66. nvidia@tegra-ubuntu:~/Desktop$ sudo vi /etc/ssh/ssh_config
  67. nvidia@tegra-ubuntu:~/Desktop$ sshd -T
  68. sshd: no hostkeys available -- exiting.
  69. nvidia@tegra-ubuntu:~/Desktop$ systemctl stop ssh.service
  70. nvidia@tegra-ubuntu:~/Desktop$ sudo rm /lib/systemd/system/ssh.service
  71. nvidia@tegra-ubuntu:~/Desktop$ systemctl daemon-reload
  72. nvidia@tegra-ubuntu:~/Desktop$ systemctl start ssh.socket
  73. nvidia@tegra-ubuntu:~/Desktop$ systemctl start ssh.service
  74. nvidia@tegra-ubuntu:~/Desktop$ ls
  75. gnome-terminal.desktop nv_forums.desktop nv_jetson_zoo.desktop
  76. nv_devzone.desktop nv_jetson_projects.desktop nv_l4t_readme.desktop
  77. nvidia@tegra-ubuntu:~/Desktop$ ssh nvidia@127.0.0.1
  78. ssh: connect to host 127.0.0.1 port 22: Connection refused
  79. nvidia@tegra-ubuntu:~/Desktop$ /etc/init.d/ssh start
  80. Starting ssh (via systemctl): ssh.serviceFailed to start ssh.service: Connection timed out
  81. See system logs and 'systemctl status ssh.service' for details.
  82. failed!
  83. nvidia@tegra-ubuntu:~/Desktop$ systemctl status ssh.service
  84. ● ssh.service - LSB: OpenBSD Secure Shell server
  85. Loaded: loaded (/etc/init.d/ssh; generated)
  86. Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 2h 58min ago
  87. Docs: man:systemd-sysv-generator(8)
  88. Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)
  89. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
  90. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: * Starting OpenBSD Secure Shell server sshd
  91. Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
  92. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: ...fail!
  93. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
  94. nvidia@tegra-ubuntu:~/Desktop$ ssh-keygen -A
  95. ssh-keygen: generating new host keys: RSA Could not save your public key in /etc/ssh/ssh_host_rsa_key.K1nvHGTwzM: Permission denied
  96. ssh-keygen: generating new host keys: DSA Could not save your public key in /etc/ssh/ssh_host_dsa_key.ozu0XOi5Bt: Permission denied
  97. ssh-keygen: generating new host keys: ECDSA Could not save your public key in /etc/ssh/ssh_host_ecdsa_key.gTMnQdFSb8: Permission denied
  98. ssh-keygen: generating new host keys: ED25519 Could not save your public key in /etc/ssh/ssh_host_ed25519_key.33AuhJCeht: Permission denied
  99. nvidia@tegra-ubuntu:~/Desktop$ sudo ssh-keygen -A
  100. [sudo] password for nvidia:
  101. ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
  102. nvidia@tegra-ubuntu:~/Desktop$ ssh nvidia@127.0.0.1
  103. ssh: connect to host 127.0.0.1 port 22: Connection refused
  104. nvidia@tegra-ubuntu:~/Desktop$ /etc/init.d/ssh start
  105. Starting ssh (via systemctl): ssh.service.
  106. nvidia@tegra-ubuntu:~/Desktop$ ssh nvidia@127.0.0.1
  107. ssh: connect to host 127.0.0.1 port 22: Connection refused
  108. nvidia@tegra-ubuntu:~/Desktop$ systemctl status ssh.service
  109. ● ssh.service - LSB: OpenBSD Secure Shell server
  110. Loaded: loaded (/etc/init.d/ssh; generated)
  111. Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 2h 59min ago
  112. Docs: man:systemd-sysv-generator(8)
  113. Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)
  114. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
  115. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: * Starting OpenBSD Secure Shell server sshd
  116. Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
  117. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: ...fail!
  118. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
  119. nvidia@tegra-ubuntu:~/Desktop$ service ssh status
  120. ● ssh.service - LSB: OpenBSD Secure Shell server
  121. Loaded: loaded (/etc/init.d/ssh; generated)
  122. Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 2min ago
  123. Docs: man:systemd-sysv-generator(8)
  124. Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)
  125. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
  126. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: * Starting OpenBSD Secure Shell server sshd
  127. Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
  128. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: ...fail!
  129. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
  130. nvidia@tegra-ubuntu:~/Desktop$ sudo ssh-keygen -A
  131. nvidia@tegra-ubuntu:~/Desktop$ /etc/init.d/ssh start
  132. Starting ssh (via systemctl): ssh.service.
  133. nvidia@tegra-ubuntu:~/Desktop$ service ssh status
  134. ● ssh.service - LSB: OpenBSD Secure Shell server
  135. Loaded: loaded (/etc/init.d/ssh; generated)
  136. Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 3min ago
  137. Docs: man:systemd-sysv-generator(8)
  138. Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)
  139. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
  140. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: * Starting OpenBSD Secure Shell server sshd
  141. Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
  142. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: ...fail!
  143. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
  144. nvidia@tegra-ubuntu:~/Desktop$ sudo ssh-keygen -t rsa
  145. Generating public/private rsa key pair.
  146. Enter file in which to save the key (/root/.ssh/id_rsa):
  147. Created directory '/root/.ssh'.
  148. Enter passphrase (empty for no passphrase):
  149. Enter same passphrase again:
  150. Your identification has been saved in /root/.ssh/id_rsa
  151. Your public key has been saved in /root/.ssh/id_rsa.pub
  152. The key fingerprint is:
  153. SHA256:DaBMEybUCJchmu7cAK8xXOyKJNBN/mBTthQzzMmTjy4 root@tegra-ubuntu
  154. The key's randomart image is:
  155. +---[RSA 3072]----+
  156. |oo==*=O+ |
  157. |.=+O.*B= |
  158. |= .oO .+. |
  159. |=.o. +. .o |
  160. |+=.. .. S . |
  161. |*++ E . |
  162. |o+ . . |
  163. | |
  164. | |
  165. +----[SHA256]-----+
  166. nvidia@tegra-ubuntu:~/Desktop$ /etc/init.d/ssh start
  167. Starting ssh (via systemctl): ssh.service.
  168. nvidia@tegra-ubuntu:~/Desktop$ service ssh status
  169. ● ssh.service - LSB: OpenBSD Secure Shell server
  170. Loaded: loaded (/etc/init.d/ssh; generated)
  171. Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 4min ago
  172. Docs: man:systemd-sysv-generator(8)
  173. Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)
  174. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
  175. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: * Starting OpenBSD Secure Shell server sshd
  176. Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
  177. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: ...fail!
  178. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
  179. nvidia@tegra-ubuntu:~/Desktop$ systemctl status ssh.service
  180. ● ssh.service - LSB: OpenBSD Secure Shell server
  181. Loaded: loaded (/etc/init.d/ssh; generated)
  182. Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 5min ago
  183. Docs: man:systemd-sysv-generator(8)
  184. Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)
  185. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
  186. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: * Starting OpenBSD Secure Shell server sshd
  187. Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
  188. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: ...fail!
  189. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
  190. nvidia@tegra-ubuntu:~/Desktop$ ssh nvidia@127.0.0.1
  191. ssh: connect to host 127.0.0.1 port 22: Connection refused
  192. nvidia@tegra-ubuntu:~/Desktop$ sudo ssh-keygen -A
  193. nvidia@tegra-ubuntu:~/Desktop$ sudo systemctl start sshd
  194. nvidia@tegra-ubuntu:~/Desktop$ ssh nvidia@127.0.0.1
  195. ssh: connect to host 127.0.0.1 port 22: Connection refused
  196. nvidia@tegra-ubuntu:~/Desktop$ systemctl status ssh.service
  197. ● ssh.service - LSB: OpenBSD Secure Shell server
  198. Loaded: loaded (/etc/init.d/ssh; generated)
  199. Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 7min ago
  200. Docs: man:systemd-sysv-generator(8)
  201. Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)
  202. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
  203. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: * Starting OpenBSD Secure Shell server sshd
  204. Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
  205. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: ...fail!
  206. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
  207. nvidia@tegra-ubuntu:~/Desktop$ sudo dpkg-reconfigure openssh-server
  208. nvidia@tegra-ubuntu:~/Desktop$ systemctl status ssh.service
  209. ● ssh.service - LSB: OpenBSD Secure Shell server
  210. Loaded: loaded (/etc/init.d/ssh; generated)
  211. Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 15min ago
  212. Docs: man:systemd-sysv-generator(8)
  213. Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)
  214. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
  215. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: * Starting OpenBSD Secure Shell server sshd
  216. Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
  217. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: ...fail!
  218. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
  219. nvidia@tegra-ubuntu:~/Desktop$ systemctl status ssh.service
  220. ● ssh.service - LSB: OpenBSD Secure Shell server
  221. Loaded: loaded (/etc/init.d/ssh; generated)
  222. Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 15min ago
  223. Docs: man:systemd-sysv-generator(8)
  224. Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)
  225. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
  226. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: * Starting OpenBSD Secure Shell server sshd
  227. Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
  228. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: ...fail!
  229. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
  230. nvidia@tegra-ubuntu:~/Desktop$ /etc/init.d/ssh start
  231. Starting ssh (via systemctl): ssh.service.
  232. nvidia@tegra-ubuntu:~/Desktop$ ssh nvidia@127.0.0.1
  233. ssh: connect to host 127.0.0.1 port 22: Connection refused
  234. nvidia@tegra-ubuntu:~/Desktop$ ssh localhost
  235. ssh: connect to host localhost port 22: Connection refused
  236. nvidia@tegra-ubuntu:~/Desktop$ sudo ssh nvidia@127.0.0.1
  237. [sudo] password for nvidia:
  238. ssh: connect to host 127.0.0.1 port 22: Connection refused
  239. nvidia@tegra-ubuntu:~/Desktop$ sudo netstat -nltp | grep 22
  240. nvidia@tegra-ubuntu:~/Desktop$ service ssh status
  241. ● ssh.service - LSB: OpenBSD Secure Shell server
  242. Loaded: loaded (/etc/init.d/ssh; generated)
  243. Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 32min ago
  244. Docs: man:systemd-sysv-generator(8)
  245. Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)
  246. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
  247. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: * Starting OpenBSD Secure Shell server sshd
  248. Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
  249. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: ...fail!
  250. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
  251. nvidia@tegra-ubuntu:~/Desktop$ sudo ufw status
  252. Status: active
  253. To Action From
  254. -- ------ ----
  255. 22 ALLOW Anywhere
  256. 22 (v6) ALLOW Anywhere (v6)
  257. nvidia@tegra-ubuntu:~/Desktop$ sudo ufw disable
  258. Firewall stopped and disabled on system startup
  259. nvidia@tegra-ubuntu:~/Desktop$ service ssh status
  260. ● ssh.service - LSB: OpenBSD Secure Shell server
  261. Loaded: loaded (/etc/init.d/ssh; generated)
  262. Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 34min ago
  263. Docs: man:systemd-sysv-generator(8)
  264. Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)
  265. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
  266. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: * Starting OpenBSD Secure Shell server sshd
  267. Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
  268. Apr 04 09:35:36 tegra-ubuntu ssh[4562]: ...fail!
  269. Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
  270. nvidia@tegra-ubuntu:~/Desktop$ sudo netstat -nltp | grep 22
  271. nvidia@tegra-ubuntu:~/Desktop$ sudo ufw status
  272. Status: inactive
  273. nvidia@tegra-ubuntu:~/Desktop$ sudo ssh nvidia@127.0.0.1
  274. ssh: connect to host 127.0.0.1 port 22: Connection refused
  275. nvidia@tegra-ubuntu:~/Desktop$ ufw allow 22
  276. ERROR: You need to be root to run this script
  277. nvidia@tegra-ubuntu:~/Desktop$ sudo ufw allow 22
  278. Skipping adding existing rule
  279. Skipping adding existing rule (v6)
  280. nvidia@tegra-ubuntu:~/Desktop$ sudo ssh nvidia@127.0.0.1
  281. ssh: connect to host 127.0.0.1 port 22: Connection refused
  282. nvidia@tegra-ubuntu:~/Desktop$ /etc/init.d/ssh start
  283. Starting ssh (via systemctl): ssh.service.
  284. nvidia@tegra-ubuntu:~/Desktop$ sudo apt-get install openbsd
  285. Reading package lists... Done
  286. Building dependency tree
  287. Reading state information... Done
  288. E: Unable to locate package openbsd
  289. nvidia@tegra-ubuntu:~/Desktop$ sudo vi /etc/ssh/ssh_config
  290. nvidia@tegra-ubuntu:~/Desktop$ sudo systemctl restart sshd
  291. nvidia@tegra-ubuntu:~/Desktop$ /etc/init.d/ssh start
  292. Starting ssh (via systemctl): ssh.service.
  293. nvidia@tegra-ubuntu:~/Desktop$ sudo ssh nvidia@127.0.0.1
  294. The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
  295. ECDSA key fingerprint is SHA256:CCkCNwrmM/0rdsB6SeMRAX+5VjJNN0KmWTwkr2DzbuI.
  296. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
  297. Warning: Permanently added '127.0.0.1' (ECDSA) to the list of known hosts.
  298. nvidia@127.0.0.1's password:
  299. Welcome to Ubuntu 20.04.4 LTS (GNU/Linux 5.10.104-tegra aarch64)
  300. * Documentation: https://help.ubuntu.com
  301. * Management: https://landscape.canonical.com
  302. * Support: https://ubuntu.com/advantage
  303. This system has been minimized by removing packages and content that are
  304. not required on a system that users do not log into.
  305. To restore this content, you can run the 'unminimize' command.
  306. 311 updates can be applied immediately.
  307. 229 of these updates are standard security updates.
  308. To see these additional updates run: apt list --upgradable
  309. Last login: Tue Apr 4 07:35:48 2023
  310. nvidia@tegra-ubuntu:~$ exit
  311. logout
  312. Connection to 127.0.0.1 closed.
  313. nvidia@tegra-ubuntu:~/Desktop$ systemctl status ssh.service
  314. ● ssh.service - LSB: OpenBSD Secure Shell server
  315. Loaded: loaded (/etc/init.d/ssh; generated)
  316. Active: active (running) since Tue 2023-04-04 13:19:58 UTC; 2min 23s ago
  317. Docs: man:systemd-sysv-generator(8)
  318. Process: 5284 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)
  319. Tasks: 1 (limit: 36322)
  320. Memory: 1.0M
  321. CGroup: /system.slice/ssh.service
  322. └─5292 sshd: /usr/sbin/sshd [listener] 0 of 10-100 startups
  323. Apr 04 13:19:58 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
  324. Apr 04 13:19:58 tegra-ubuntu ssh[5284]: * Starting OpenBSD Secure Shell server sshd
  325. Apr 04 13:19:58 tegra-ubuntu ssh[5284]: ...done.
  326. Apr 04 13:19:58 tegra-ubuntu sshd[5292]: Server listening on 0.0.0.0 port 22.
  327. Apr 04 13:19:58 tegra-ubuntu sshd[5292]: Server listening on :: port 22.
  328. Apr 04 13:19:58 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
  329. Apr 04 13:20:19 tegra-ubuntu sshd[5318]: Accepted password for nvidia from 127.0.0.1 port 50654 ssh2
  330. Apr 04 13:20:19 tegra-ubuntu sshd[5318]: pam_unix(sshd:session):

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/很楠不爱3/article/detail/187700
推荐阅读
相关标签
  

闽ICP备14008679号