小编Ken*_*ter的帖子

rpcbind 究竟做了什么?

根据文档:

rpcbind[3] 实用程序将 RPC 服务映射到它们侦听的端口。RPC 进程在启动时会通知 rpcbind,注册它们正在侦听的端口以及它们期望服务的 RPC 程序编号。然后,客户端系统使用特定的 RPC 程序编号联系服务器上的 rpcbind。rpcbind 服务将客户端重定向到正确的端口号,以便它可以与请求的服务进行通信

为了对此进行测试,我设置了 NFS 服务器和客户端并监控它们之间的流量。从我看到的情况来看,客户端已经知道服务器上的 NFS 服务正在监听 2049 端口。

那么 rcpbind 什么时候开始发挥作用呢?当我rpcinfo在服务器上这样做时,我得到以下信息:

100003    2    udp       0.0.0.0.8.1            nfs        superuser
100003    3    udp       0.0.0.0.8.1            nfs        superuser
100003    2    udp6      ::.8.1                 nfs        superuser
100003    3    udp6      ::.8.1                 nfs        superuser
100003    2    tcp       0.0.0.0.8.1            nfs        superuser
100003    3    tcp       0.0.0.0.8.1            nfs        superuser
100003    2    tcp6      ::.8.1                 nfs        superuser
100003    3    tcp6      ::.8.1                 nfs        superuser
Run Code Online (Sandbox Code Playgroud)

0.0.0.0.8.1在这种情况下是什么意思?这如何转换为端口 2049?

remote

52
推荐指数
1
解决办法
14万
查看次数

在 Raspbian 下使用 RSA 密钥的 SSH 不断请求密码

背景资料

我正在尝试通过 SSH 将 Raspberry Pi(Raspbian)连接到另一个。因此,我在我的“客户端”Pi 中生成了一对 RSA 密钥,并将其公钥保存在我的“服务器”Pi 中。

cat ~/.ssh/id_rsa.pub | ssh pi@piserver 'cat >> .ssh/authorized_keys'
Run Code Online (Sandbox Code Playgroud)

问题

每当我尝试通过以下命令访问我的服务器时,都会要求我提供密码。

ssh pi@piserver
Enter passphrase for key '/home/pi/.ssh/id_rsa':
Run Code Online (Sandbox Code Playgroud)

更多信息

客户端 ./ssh 文件夹详细信息:

ls -l
total 16
-rw-r--r-- 1 pi pi  396 Feb 28 18:07 authorized_keys
-rw------- 1 pi pi 1766 Feb 28 18:09 id_rsa
-rw-r--r-- 1 pi pi  396 Feb 28 18:09 id_rsa.pub
-rw-r--r-- 1 pi pi  222 Feb 28 13:11 known_hosts
Run Code Online (Sandbox Code Playgroud)

服务器 ./ssh 文件夹详细信息:

ls -l
total 4
-rw-r--r-- 1 …
Run Code Online (Sandbox Code Playgroud)

ssh raspberry-pi raspbian

3
推荐指数
1
解决办法
1916
查看次数

sshd 重置不同端口上的连接

我想在我的树莓设备上的两个端口上运行 SSHd。我已经添加

Port 22
Port 5500
Run Code Online (Sandbox Code Playgroud)

/etc/ssh/sshd_config,然后跑了/etc/init.d/ssh restart

问题是,端口 5500 上的连接总是被重置。

我可以在这里看到可能的问题:(它正在以用户身份收听pi)。不知道这怎么会发生。

> lsof -i
sshd     7727   pi    3u  IPv4  13512      0t0  TCP *:5500 (LISTEN)
sshd     8122 root    3u  IPv4  15032      0t0  TCP *:ssh (LISTEN)
Run Code Online (Sandbox Code Playgroud)

此外,其他输出:

> ssh localhost -p 5500 -v
debug1: Local version string SSH-2.0-OpenSSH_6.0p1 Debian-4+deb7u2
debug1: SSH2_MSG_KEXINIT sent
Read from socket failed: Connection reset by peer
Run Code Online (Sandbox Code Playgroud)

来自 /var/log/auth.log

> tail /var/auth/auth.log
Dec  1 18:01:18 usoplesk sshd[8297]: error: Could not load host …
Run Code Online (Sandbox Code Playgroud)

ssh

0
推荐指数
1
解决办法
1850
查看次数

为了完成这个问题,我会发出什么命令?

所以我尝试了 10 多种不同的尝试,但我被难住了

这是两个倒树图。发出命令将左图更改为右图。假设您在主目录中并使用相对路径名。[home] 是您的主目录:

这是图表:

         [home]                                          [home]
           |                                               |
     +----------+----------+                      +-------------+
     |          |          |                      |             | 
systems       ideas     courses                  ideas       courses
     |                                                          |
    notes                                                     systems
                                                                |
                                                              notes
Run Code Online (Sandbox Code Playgroud)

这是我迄今为止尝试过的:

mv system courses/system
mv [home] home
mv [home] [home]
mv [home]/courses/ideas/systems/notes [home]/ideas/courses/system/notes 
Run Code Online (Sandbox Code Playgroud)

还有更多……有什么想法吗?

顺便说一下,我正在使用 SSH Secure Shell 来做到这一点。

command-line shell

-3
推荐指数
1
解决办法
3143
查看次数

标签 统计

ssh ×2

command-line ×1

raspberry-pi ×1

raspbian ×1

remote ×1

shell ×1