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

46 篇文章 6 订阅
28 篇文章 1 订阅

硬件设备,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 server
     Loaded: 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 ago
       Docs: 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 server
     Loaded: loaded (/etc/init.d/ssh; generated)
     Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 2h 58min ago
       Docs: 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 server
     Loaded: loaded (/etc/init.d/ssh; generated)
     Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 2h 59min ago
       Docs: 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 server
     Loaded: loaded (/etc/init.d/ssh; generated)
     Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 2min ago
       Docs: 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 server
     Loaded: loaded (/etc/init.d/ssh; generated)
     Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 3min ago
       Docs: 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 server
     Loaded: loaded (/etc/init.d/ssh; generated)
     Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 4min ago
       Docs: 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 server
     Loaded: loaded (/etc/init.d/ssh; generated)
     Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 5min ago
       Docs: 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 server
     Loaded: loaded (/etc/init.d/ssh; generated)
     Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 7min ago
       Docs: 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 server
     Loaded: loaded (/etc/init.d/ssh; generated)
     Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 15min ago
       Docs: 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 server
     Loaded: loaded (/etc/init.d/ssh; generated)
     Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 15min ago
       Docs: 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 server
     Loaded: loaded (/etc/init.d/ssh; generated)
     Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 32min ago
       Docs: 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: active

To                         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 server
     Loaded: loaded (/etc/init.d/ssh; generated)
     Active: active (exited) since Tue 2023-04-04 09:35:36 UTC; 3h 34min ago
       Docs: 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/advantage

This 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 --upgradable

Last 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 server
     Loaded: loaded (/etc/init.d/ssh; generated)
     Active: active (running) since Tue 2023-04-04 13:19:58 UTC; 2min 23s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 5284 ExecStart=/etc/init.d/ssh start (code=exited, status=0/SUCCESS)
      Tasks: 1 (limit: 36322)
     Memory: 1.0M
     CGroup: /system.slice/ssh.service
             └─5292 sshd: /usr/sbin/sshd [listener] 0 of 10-100 startups

Apr 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):

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
### 回答1: 要在Jetson Nano上安装Ubuntu 20.04,您可以按照以下步骤操作: 1. 下载Ubuntu 20.04的映像文件,可以从Ubuntu官网下载。 2. 将Jetson Nano连接到电脑上,使用USB转接器或者网线连接。 3. 使用Etcher等工具将Ubuntu 20.04映像文件烧录到SD卡中。 4. 将SD卡插入Jetson Nano中,连接显示器、键盘和鼠标。 5. 开机后按照提示进行安装,选择安装Ubuntu 20.04。 6. 安装完成后,可以进行系统设置和软件安装。 注意事项: 1. 确保SD卡的容量足够大,建议使用32GB或以上的SD卡。 2. 安装过程需要一定的时间,请耐心等待。 3. 在安装过程中,可能需要输入一些配置信息,如用户名、密码等。 4. 安装完成后,可以使用命令行或者图形界面进行操作。 ### 回答2: Jetson Nano是一款强大的嵌入式开发板,它于2019年由英伟达公司推出,并于2020年2月发布了全新的JetPack 4.4操作系统,支持安装最新的Ubuntu 20.04。 安装Ubuntu 20.04是十分简单的,只需要按照下面的步骤即可完成。 步骤一:准备一个SD卡 首先,我们需要一个SD卡,容量大于16GB。将SD卡插入电脑,打开终端,使用以下命令查看SD卡路径: $ df -h 找到SD卡的路径,比如/dev/sdb1。这里假设SD卡的路径为 /dev/sdb1。 步骤二:下载Ubuntu 20.04镜像 在电脑上下载Ubuntu 20.04 LTS的镜像文件。可以从Ubuntu官网下载,也可以使用以下命令: $ wget https://developer.nvidia.com/embedded/dlc/r32-4-2_Release_v1.0/t210ref_release_aarch64/Tegra210_Linux_R32.4.2_aarch64.tbz2 步骤三:解压缩镜像文件 下载完成后,使用以下命令解压缩镜像文件: $ tar -xvf Tegra210_Linux_R32.4.2_aarch64.tbz2 步骤四:制作启动镜像 使用以下命令将镜像文件烧录到SD卡上: $ cd Linux_for_Tegra $ sudo ./flash.sh jetson-nano-emmc mmcblk0p1 这个过程需要一些时间,最好耐心等待,直到出现“ Flash was successful”信息。 步骤五:将SD卡插入Jetson Nano并启动 将SD卡插入Jetson Nano中,并将板子连接到电脑上。电脑使用串口或者HDMI显示器连接Jetson Nano。然后按下电源按键,Jetson Nano将启动。 在启动过程中,进入系统设置并进行基本设置。 以上就是安装Ubuntu 20.04的简单步骤。安装完成后,你可以尽情地在Jetson Nano上进行开发和实验,感受其强大性能和多样化的应用场景。 ### 回答3: Jetson Nano是一款基于ARM的嵌入式开发板,它集成了NVIDIA的Tegra XL SoC,是一款高性能、低功耗的嵌入式计算平台。安装Ubuntu 20.04操作系统可以进一步提高Jetson Nano的性能和功能。 安装Ubuntu 20.04的步骤如下: 1. 下载系统镜像文件。可以从Ubuntu官网上下载Jetson Nano适用的Ubuntu 20.04镜像文件,或者从NVIDIA官网上下载JetPack软件包,其中包含Ubuntu 20.04镜像文件和其他必要的工具和驱动程序。 2. 制作启动SD卡。将下载的镜像文件烧录到SD卡中,可以使用Etcher等工具进行烧录。 3. 启动Jetson Nano。将SD卡插入Jetson Nano,接上键盘、鼠标和显示器,然后开机即可。 4. 安装系统。按照屏幕提示进行安装,选择自己需要的语言、时区和分区等信息,然后等待安装完成。 5. 配置系统。安装完成后,需要进行一些系统配置,例如更新软件源、安装必要的软件包和驱动程序等。 6. 开始开发。安装完成后,Jetson Nano就可以进行开发了。可以使用各种语言和工具进行开发,例如Python、C++、CUDA、TensorFlow等等。 总之,Jetson Nano上安装Ubuntu 20.04十分简单,只需要遵循上述步骤即可完成安装和配置。安装Ubuntu 20.04可以为Jetson Nano提供更好的性能和更丰富的功能,帮助开发者更方便地进行开发和调试。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

无证驾驶梁嗖嗖

让我们解决Jetson使用问题

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值