Jetson Orin(Ubuntu20.04)反馈SSH远程别的设备可以成功,别的设备无法登录本机设备

本文主要是介绍Jetson Orin(Ubuntu20.04)反馈SSH远程别的设备可以成功,别的设备无法登录本机设备,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

硬件设备,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

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

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

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

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

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

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

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

 

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

HostKeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa

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

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

 sudo systemctl restart sshd 

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

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

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

sudo apt-get install iptables-persistent
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:netfilter-persistent
The following NEW packages will be installed:iptables-persistent netfilter-persistent
0 upgraded, 2 newly installed, 0 to remove and 324 not upgraded.
Need to get 13.8 kB of archives.
After this operation, 89.1 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 netfilter-persistent all 1.0.14ubuntu1 [7,268 B]
Get:2 http://ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 iptables-persistent all 1.0.14ubuntu1 [6,552 B]
Fetched 13.8 kB in 1s (16.6 kB/s)              
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package netfilter-persistent.
dpkg: warning: files list file for package 'openssh-server' missing; assuming package has no files currently installed
(Reading database ... 147380 files and directories currently installed.)
Preparing to unpack .../netfilter-persistent_1.0.14ubuntu1_all.deb ...
Unpacking netfilter-persistent (1.0.14ubuntu1) ...
Selecting previously unselected package iptables-persistent.
Preparing to unpack .../iptables-persistent_1.0.14ubuntu1_all.deb ...
Unpacking iptables-persistent (1.0.14ubuntu1) ...
Setting up netfilter-persistent (1.0.14ubuntu1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/netfilter-persistent.service → /lib/systemd/system/netfilter-persistent.service.
Setting up iptables-persistent (1.0.14ubuntu1) ...
update-alternatives: using /lib/systemd/system/netfilter-persistent.service to provide /lib/systemd/system/iptables.service (iptables.service) in auto mode
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for systemd (245.4-4ubuntu3.17) ...
nvidia@tegra-ubuntu:~/Desktop$ sudo netstat -nltp | grep 22
nvidia@tegra-ubuntu:~/Desktop$ sudo apt-get install ufw
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ufw is already the newest version (0.36-6ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 324 not upgraded.
nvidia@tegra-ubuntu:~/Desktop$ sudo ufw enable
Firewall is active and enabled on system startup
nvidia@tegra-ubuntu:~/Desktop$ sudo ufw allow 22
Skipping adding existing rule
Skipping adding existing rule (v6)
nvidia@tegra-ubuntu:~/Desktop$ ssh nvidia@127.0.0.1
ssh: connect to host 127.0.0.1 port 22: Connection refused
nvidia@tegra-ubuntu:~/Desktop$ service sshd restart
Job for ssh.service failed because the control process exited with error code.
See "systemctl status ssh.service" and "journalctl -xe" for details.
nvidia@tegra-ubuntu:~/Desktop$ sudo service sshd restart
Job for ssh.service failed because the control process exited with error code.
See "systemctl status ssh.service" and "journalctl -xe" for details.
nvidia@tegra-ubuntu:~/Desktop$ systemctl status ssh.service 
● ssh.service - OpenBSD Secure Shell serverLoaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)Active: failed (Result: exit-code) since Tue 2023-04-04 09:30:00 UTC; 19s agoDocs: man:sshd(8)man:sshd_config(5)Process: 4358 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=1/FAILURE)Apr 04 09:30:00 tegra-ubuntu systemd[1]: ssh.service: Scheduled restart job, restart counter is at 5.
Apr 04 09:30:00 tegra-ubuntu systemd[1]: Stopped OpenBSD Secure Shell server.
Apr 04 09:30:00 tegra-ubuntu systemd[1]: ssh.service: Start request repeated too quickly.
Apr 04 09:30:00 tegra-ubuntu systemd[1]: ssh.service: Failed with result 'exit-code'.
Apr 04 09:30:00 tegra-ubuntu systemd[1]: Failed to start OpenBSD Secure Shell server.
Apr 04 09:30:07 tegra-ubuntu systemd[1]: ssh.service: Start request repeated too quickly.
Apr 04 09:30:07 tegra-ubuntu systemd[1]: ssh.service: Failed with result 'exit-code'.
Apr 04 09:30:07 tegra-ubuntu systemd[1]: Failed to start OpenBSD Secure Shell server.
nvidia@tegra-ubuntu:~/Desktop$ sudo vi /etc/ssh/ssh_config
nvidia@tegra-ubuntu:~/Desktop$ sshd -T
sshd: no hostkeys available -- exiting.
nvidia@tegra-ubuntu:~/Desktop$ systemctl stop ssh.service
nvidia@tegra-ubuntu:~/Desktop$ sudo rm /lib/systemd/system/ssh.service 
nvidia@tegra-ubuntu:~/Desktop$ systemctl daemon-reload 
nvidia@tegra-ubuntu:~/Desktop$ systemctl start ssh.socket 
nvidia@tegra-ubuntu:~/Desktop$ systemctl start ssh.service
nvidia@tegra-ubuntu:~/Desktop$ ls
gnome-terminal.desktop  nv_forums.desktop           nv_jetson_zoo.desktop
nv_devzone.desktop      nv_jetson_projects.desktop  nv_l4t_readme.desktop
nvidia@tegra-ubuntu:~/Desktop$ ssh nvidia@127.0.0.1
ssh: connect to host 127.0.0.1 port 22: Connection refused
nvidia@tegra-ubuntu:~/Desktop$ /etc/init.d/ssh start
Starting ssh (via systemctl): ssh.serviceFailed to start ssh.service: Connection timed out
See system logs and 'systemctl status ssh.service' for details.failed!
nvidia@tegra-ubuntu:~/Desktop$ systemctl status ssh.service
● ssh.service - LSB: OpenBSD Secure Shell serverLoaded: loaded (/etc/init.d/ssh; generated)Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 2h 58min agoDocs: man:systemd-sysv-generator(8)Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:  * Starting OpenBSD Secure Shell server sshd
Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:    ...fail!
Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
nvidia@tegra-ubuntu:~/Desktop$ ssh-keygen -A
ssh-keygen: generating new host keys: RSA Could not save your public key in /etc/ssh/ssh_host_rsa_key.K1nvHGTwzM: Permission denied
ssh-keygen: generating new host keys: DSA Could not save your public key in /etc/ssh/ssh_host_dsa_key.ozu0XOi5Bt: Permission denied
ssh-keygen: generating new host keys: ECDSA Could not save your public key in /etc/ssh/ssh_host_ecdsa_key.gTMnQdFSb8: Permission denied
ssh-keygen: generating new host keys: ED25519 Could not save your public key in /etc/ssh/ssh_host_ed25519_key.33AuhJCeht: Permission denied
nvidia@tegra-ubuntu:~/Desktop$ sudo ssh-keygen -A
[sudo] password for nvidia: 
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519 
nvidia@tegra-ubuntu:~/Desktop$ ssh nvidia@127.0.0.1
ssh: connect to host 127.0.0.1 port 22: Connection refused
nvidia@tegra-ubuntu:~/Desktop$ /etc/init.d/ssh start
Starting ssh (via systemctl): ssh.service.
nvidia@tegra-ubuntu:~/Desktop$ ssh nvidia@127.0.0.1
ssh: connect to host 127.0.0.1 port 22: Connection refused
nvidia@tegra-ubuntu:~/Desktop$ systemctl status ssh.service
● ssh.service - LSB: OpenBSD Secure Shell serverLoaded: loaded (/etc/init.d/ssh; generated)Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 2h 59min agoDocs: man:systemd-sysv-generator(8)Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:  * Starting OpenBSD Secure Shell server sshd
Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:    ...fail!
Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
nvidia@tegra-ubuntu:~/Desktop$ service ssh status
● ssh.service - LSB: OpenBSD Secure Shell serverLoaded: loaded (/etc/init.d/ssh; generated)Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 2min agoDocs: man:systemd-sysv-generator(8)Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:  * Starting OpenBSD Secure Shell server sshd
Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:    ...fail!
Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
nvidia@tegra-ubuntu:~/Desktop$ sudo ssh-keygen -A
nvidia@tegra-ubuntu:~/Desktop$ /etc/init.d/ssh start
Starting ssh (via systemctl): ssh.service.
nvidia@tegra-ubuntu:~/Desktop$ service ssh status
● ssh.service - LSB: OpenBSD Secure Shell serverLoaded: loaded (/etc/init.d/ssh; generated)Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 3min agoDocs: man:systemd-sysv-generator(8)Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:  * Starting OpenBSD Secure Shell server sshd
Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:    ...fail!
Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
nvidia@tegra-ubuntu:~/Desktop$ sudo ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_rsa
Your public key has been saved in /root/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:DaBMEybUCJchmu7cAK8xXOyKJNBN/mBTthQzzMmTjy4 root@tegra-ubuntu
The key's randomart image is:
+---[RSA 3072]----+
|oo==*=O+         |
|.=+O.*B=         |
|= .oO .+.        |
|=.o. +. .o       |
|+=.. .. S .      |
|*++ E .          |
|o+ . .           |
|                 |
|                 |
+----[SHA256]-----+
nvidia@tegra-ubuntu:~/Desktop$ /etc/init.d/ssh start
Starting ssh (via systemctl): ssh.service.
nvidia@tegra-ubuntu:~/Desktop$ service ssh status
● ssh.service - LSB: OpenBSD Secure Shell serverLoaded: loaded (/etc/init.d/ssh; generated)Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 4min agoDocs: man:systemd-sysv-generator(8)Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:  * Starting OpenBSD Secure Shell server sshd
Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:    ...fail!
Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
nvidia@tegra-ubuntu:~/Desktop$ systemctl status ssh.service
● ssh.service - LSB: OpenBSD Secure Shell serverLoaded: loaded (/etc/init.d/ssh; generated)Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 5min agoDocs: man:systemd-sysv-generator(8)Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:  * Starting OpenBSD Secure Shell server sshd
Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:    ...fail!
Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
nvidia@tegra-ubuntu:~/Desktop$ ssh nvidia@127.0.0.1
ssh: connect to host 127.0.0.1 port 22: Connection refused
nvidia@tegra-ubuntu:~/Desktop$ sudo ssh-keygen -A
nvidia@tegra-ubuntu:~/Desktop$ sudo systemctl start sshd
nvidia@tegra-ubuntu:~/Desktop$ ssh nvidia@127.0.0.1
ssh: connect to host 127.0.0.1 port 22: Connection refused
nvidia@tegra-ubuntu:~/Desktop$ systemctl status ssh.service
● ssh.service - LSB: OpenBSD Secure Shell serverLoaded: loaded (/etc/init.d/ssh; generated)Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 7min agoDocs: man:systemd-sysv-generator(8)Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:  * Starting OpenBSD Secure Shell server sshd
Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:    ...fail!
Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
nvidia@tegra-ubuntu:~/Desktop$ sudo dpkg-reconfigure openssh-server
nvidia@tegra-ubuntu:~/Desktop$ systemctl status ssh.service
● ssh.service - LSB: OpenBSD Secure Shell serverLoaded: loaded (/etc/init.d/ssh; generated)Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 15min agoDocs: man:systemd-sysv-generator(8)Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:  * Starting OpenBSD Secure Shell server sshd
Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:    ...fail!
Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
nvidia@tegra-ubuntu:~/Desktop$ systemctl status ssh.service
● ssh.service - LSB: OpenBSD Secure Shell serverLoaded: loaded (/etc/init.d/ssh; generated)Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 15min agoDocs: man:systemd-sysv-generator(8)Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:  * Starting OpenBSD Secure Shell server sshd
Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:    ...fail!
Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
nvidia@tegra-ubuntu:~/Desktop$ /etc/init.d/ssh start
Starting ssh (via systemctl): ssh.service.
nvidia@tegra-ubuntu:~/Desktop$ ssh nvidia@127.0.0.1
ssh: connect to host 127.0.0.1 port 22: Connection refused
nvidia@tegra-ubuntu:~/Desktop$ ssh localhost
ssh: connect to host localhost port 22: Connection refused
nvidia@tegra-ubuntu:~/Desktop$ sudo ssh nvidia@127.0.0.1
[sudo] password for nvidia: 
ssh: connect to host 127.0.0.1 port 22: Connection refused
nvidia@tegra-ubuntu:~/Desktop$ sudo netstat -nltp | grep 22
nvidia@tegra-ubuntu:~/Desktop$ service ssh status
● ssh.service - LSB: OpenBSD Secure Shell serverLoaded: loaded (/etc/init.d/ssh; generated)Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 32min agoDocs: man:systemd-sysv-generator(8)Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:  * Starting OpenBSD Secure Shell server sshd
Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:    ...fail!
Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
nvidia@tegra-ubuntu:~/Desktop$ sudo ufw status 
Status: activeTo                         Action      From
--                         ------      ----
22                         ALLOW       Anywhere                  
22 (v6)                    ALLOW       Anywhere (v6)             nvidia@tegra-ubuntu:~/Desktop$ sudo ufw disable
Firewall stopped and disabled on system startup
nvidia@tegra-ubuntu:~/Desktop$ service ssh status
● ssh.service - LSB: OpenBSD Secure Shell serverLoaded: loaded (/etc/init.d/ssh; generated)Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 34min agoDocs: man:systemd-sysv-generator(8)Process: 4562 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)Apr 04 09:35:36 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:  * Starting OpenBSD Secure Shell server sshd
Apr 04 09:35:36 tegra-ubuntu ssh[4571]: sshd: no hostkeys available -- exiting.
Apr 04 09:35:36 tegra-ubuntu ssh[4562]:    ...fail!
Apr 04 09:35:36 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
nvidia@tegra-ubuntu:~/Desktop$ sudo netstat -nltp | grep 22
nvidia@tegra-ubuntu:~/Desktop$ sudo ufw status 
Status: inactive
nvidia@tegra-ubuntu:~/Desktop$ sudo ssh nvidia@127.0.0.1
ssh: connect to host 127.0.0.1 port 22: Connection refused
nvidia@tegra-ubuntu:~/Desktop$ ufw allow 22
ERROR: You need to be root to run this script
nvidia@tegra-ubuntu:~/Desktop$ sudo ufw allow 22
Skipping adding existing rule
Skipping adding existing rule (v6)
nvidia@tegra-ubuntu:~/Desktop$ sudo ssh nvidia@127.0.0.1
ssh: connect to host 127.0.0.1 port 22: Connection refused
nvidia@tegra-ubuntu:~/Desktop$ /etc/init.d/ssh start
Starting ssh (via systemctl): ssh.service.
nvidia@tegra-ubuntu:~/Desktop$ sudo apt-get install openbsd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package openbsd
nvidia@tegra-ubuntu:~/Desktop$ sudo vi /etc/ssh/ssh_config
nvidia@tegra-ubuntu:~/Desktop$ sudo systemctl restart sshd
nvidia@tegra-ubuntu:~/Desktop$ /etc/init.d/ssh start
Starting ssh (via systemctl): ssh.service.
nvidia@tegra-ubuntu:~/Desktop$ sudo ssh nvidia@127.0.0.1
The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
ECDSA key fingerprint is SHA256:CCkCNwrmM/0rdsB6SeMRAX+5VjJNN0KmWTwkr2DzbuI.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '127.0.0.1' (ECDSA) to the list of known hosts.
nvidia@127.0.0.1's password: 
Welcome to Ubuntu 20.04.4 LTS (GNU/Linux 5.10.104-tegra aarch64)* Documentation:  https://help.ubuntu.com* Management:     https://landscape.canonical.com* Support:        https://ubuntu.com/advantageThis system has been minimized by removing packages and content that are
not required on a system that users do not log into.To restore this content, you can run the 'unminimize' command.311 updates can be applied immediately.
229 of these updates are standard security updates.
To see these additional updates run: apt list --upgradableLast login: Tue Apr  4 07:35:48 2023
nvidia@tegra-ubuntu:~$ exit
logout
Connection to 127.0.0.1 closed.
nvidia@tegra-ubuntu:~/Desktop$ systemctl status ssh.service
● ssh.service - LSB: OpenBSD Secure Shell serverLoaded: loaded (/etc/init.d/ssh; generated)Active: active (running) since Tue 2023-04-04 13:19:58 UTC; 2min 23s agoDocs: man:systemd-sysv-generator(8)Process: 5284 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)Tasks: 1 (limit: 36322)Memory: 1.0MCGroup: /system.slice/ssh.service└─5292 sshd: /usr/sbin/sshd [listener] 0 of 10-100 startupsApr 04 13:19:58 tegra-ubuntu systemd[1]: Starting LSB: OpenBSD Secure Shell server...
Apr 04 13:19:58 tegra-ubuntu ssh[5284]:  * Starting OpenBSD Secure Shell server sshd
Apr 04 13:19:58 tegra-ubuntu ssh[5284]:    ...done.
Apr 04 13:19:58 tegra-ubuntu sshd[5292]: Server listening on 0.0.0.0 port 22.
Apr 04 13:19:58 tegra-ubuntu sshd[5292]: Server listening on :: port 22.
Apr 04 13:19:58 tegra-ubuntu systemd[1]: Started LSB: OpenBSD Secure Shell server.
Apr 04 13:20:19 tegra-ubuntu sshd[5318]: Accepted password for nvidia from 127.0.0.1 port 50654 ssh2
Apr 04 13:20:19 tegra-ubuntu sshd[5318]: pam_unix(sshd:session):

这篇关于Jetson Orin(Ubuntu20.04)反馈SSH远程别的设备可以成功,别的设备无法登录本机设备的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/324064

相关文章

Security OAuth2 单点登录流程

单点登录(英语:Single sign-on,缩写为 SSO),又译为单一签入,一种对于许多相互关连,但是又是各自独立的软件系统,提供访问控制的属性。当拥有这项属性时,当用户登录时,就可以获取所有系统的访问权限,不用对每个单一系统都逐一登录。这项功能通常是以轻型目录访问协议(LDAP)来实现,在服务器上会将用户信息存储到LDAP数据库中。相同的,单一注销(single sign-off)就是指

三国地理揭秘:为何北伐之路如此艰难,为何诸葛亮无法攻克陇右小城?

俗话说:天时不如地利,不是随便说说,诸葛亮六出祁山,连关中陇右的几座小城都攻不下来,行军山高路险,无法携带和建造攻城器械,是最难的,所以在汉中,无论从哪一方进攻,防守方都是一夫当关,万夫莫开;再加上千里运粮,根本不需要打,司马懿只需要坚守城池拼消耗就能不战而屈人之兵。 另一边,洛阳的虎牢关,一旦突破,洛阳就无险可守,这样的进军路线,才是顺势而为的用兵之道。 读历史的时候我们常常看到某一方势

【测试】输入正确用户名和密码,点击登录没有响应的可能性原因

目录 一、前端问题 1. 界面交互问题 2. 输入数据校验问题 二、网络问题 1. 网络连接中断 2. 代理设置问题 三、后端问题 1. 服务器故障 2. 数据库问题 3. 权限问题: 四、其他问题 1. 缓存问题 2. 第三方服务问题 3. 配置问题 一、前端问题 1. 界面交互问题 登录按钮的点击事件未正确绑定,导致点击后无法触发登录操作。 页面可能存在

如何编写Linux PCIe设备驱动器 之二

如何编写Linux PCIe设备驱动器 之二 功能(capability)集功能(capability)APIs通过pci_bus_read_config完成功能存取功能APIs参数pos常量值PCI功能结构 PCI功能IDMSI功能电源功率管理功能 功能(capability)集 功能(capability)APIs int pcie_capability_read_wo

git ssh key相关

step1、进入.ssh文件夹   (windows下 下载git客户端)   cd ~/.ssh(windows mkdir ~/.ssh) step2、配置name和email git config --global user.name "你的名称"git config --global user.email "你的邮箱" step3、生成key ssh-keygen

ORACLE 11g 创建数据库时 Enterprise Manager配置失败的解决办法 无法打开OEM的解决办法

在win7 64位系统下安装oracle11g,在使用Database configuration Assistant创建数据库时,在创建到85%的时候报错,错误如下: 解决办法: 在listener.ora中增加对BlueAeri-PC或ip地址的侦听,具体步骤如下: 1.启动Net Manager,在“监听程序”--Listener下添加一个地址,主机名写计

uniapp设置微信小程序的交互反馈

链接:uni.showToast(OBJECT) | uni-app官网 (dcloud.net.cn) 设置操作成功的弹窗: title是我们弹窗提示的文字 showToast是我们在加载的时候进入就会弹出的提示。 2.设置失败的提示窗口和标签 icon:'error'是设置我们失败的logo 设置的文字上限是7个文字,如果需要设置的提示文字过长就需要设置icon并给

使用Qt编程QtNetwork无法使用

使用 VS 构建 Qt 项目时 QtNetwork 无法使用的问题 - 摘叶飞镖 - 博客园 (cnblogs.com) 另外,强烈建议在使用QNetworkAccessManager之前看看这篇文章: Qt 之 QNetworkAccessManager踏坑记录-CSDN博客 C++ Qt开发:QNetworkAccessManager网络接口组件 阅读目录 1.1 通用API函数

Adblock Plus官方规则Easylist China说明与反馈贴(2015.12.15)

-------------------------------特别说明--------------------------------------- 视频广告问题:因Adblock Plus的局限,存在以下现象,优酷、搜狐、17173黑屏并倒数;乐视、爱奇艺播放广告。因为这些视频网站的Flash播放器被植入了检测代码,而Adblock Plus无法修改播放器。 如需同时使用ads

[环境配置]ubuntu20.04安装后wifi有图标但是搜不到热点解决方法

最近刚入手一台主机,暗影精灵8plus电竞主机,安装ubuntu后wifi怎么都搜不到热点,前后重装系统6次才算解决问题。这个心酸历程只有搞技术人才明白。下面介绍我解决过程。 首先主机到手后是个windows10系统,我用无线网连接了一下,可以正常上网,说明主机有无限网卡且正常。然后我就直接开始安装Ubuntu20.04了,安装成功后发现wifi有图标但是搜不到热点,我想是不是无线网卡驱动有没有