我有一个 Mikrotik 路由器 (RB951G-2HnD),它用作主路由器,将 HTTP/HTTPS 和 Plex 的端口转发到 NAT 后面的服务器。现在由于没有太多的上传带宽(15Mbps),我很想限制 WAN 接口上 HTTP/HTTPS 的带宽,以便为 Plex 留下一些带宽。我一直在寻找,/queue
但没有看到任何受端口号限制的东西。
主页
/
user-379366
Manuth Chek's questions
Manuth Chek
Asked:
2016-11-07 21:02:10 +0800 CST
这是 Ubuntu 16.04 客户端的输出:
OpenSSH_7.2p2 Ubuntu-4, OpenSSL 1.0.2g-fips 1 Mar 2016
debug1: Reading configuration data /home/manuth/.ssh/config
debug1: /home/manuth/.ssh/config line 1: Applying options for r2d2.manuth.life
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to r2d2.manuth.life [103.12.163.90] port 900.
debug1: Connection established.
debug1: identity file /home/manuth/.ssh/dqar-rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/manuth/.ssh/dqar-rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4
ssh_exchange_identification: Connection closed by remote host
的路径和权限/home/manuth/.ssh/dqar-rsa
也是正确的:
$ ls -l /home/manuth/.ssh/dqar-rsa*
-rw------- 1 manuth manuth 3243 Nov 7 11:27 /home/manuth/.ssh/dqar-rsa
-rw-r--r-- 1 manuth manuth 740 Nov 7 11:27 /home/manuth/.ssh/dqar-rsa.pub
此主机的条目~/.ssh/config
是:
host r2d2.manuth.life
IdentityFile ~/.ssh/dqar-rsa
Port 900
IdentitiesOnly yes
ForwardX11 yes
如果我尝试评论该IdentityFile
行,它甚至不会读取任何id_*
内容~/.ssh
:
OpenSSH_7.2p2 Ubuntu-4, OpenSSL 1.0.2g-fips 1 Mar 2016
debug1: Reading configuration data /home/manuth/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to r2d2.manuth.life [103.12.163.90] port 900.
debug1: Connection established.
debug1: identity file /home/manuth/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/manuth/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/manuth/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/manuth/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/manuth/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/manuth/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/manuth/.ssh/id_ed25519 type 4
debug1: key_load_public: No such file or directory
debug1: identity file /home/manuth/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4
ssh_exchange_identification: Connection closed by remote host
这似乎是今天突然出现的。
编辑:里面的内容~/.ssh
:
$ ls -la
insgesamt 36
drwx------ 2 manuth manuth 4096 Nov 7 16:28 .
drwxr-xr-x 53 manuth manuth 4096 Nov 7 13:31 ..
-rw-r--r-- 1 manuth manuth 805 Nov 7 12:10 authorized_keys
-rw-r--r-- 1 manuth manuth 543 Nov 7 13:47 config
-rw------- 1 manuth manuth 411 Nov 7 12:10 dqar-ed25519
-rw-r--r-- 1 manuth manuth 96 Nov 7 12:10 dqar-ed25519.pub
-rw------- 1 manuth manuth 3243 Nov 7 12:10 dqar-rsa
-rw-r--r-- 1 manuth manuth 740 Nov 7 12:10 dqar-rsa.pub
-rw-r--r-- 1 manuth manuth 1990 Nov 7 15:14 known_hosts
编辑 2:啊哈哈,控制台输出是这样的几行:
Nov 7 13:51:32 dqar sshd [11316]: fatal: Missing privilege separation directory: /var/empty
有问题的服务器是 FreeBSD 10.3。
Manuth Chek
Asked:
2016-10-08 20:13:33 +0800 CST
客户端是 Ubuntu 16.04 keychain
,服务器是 FreeBSD 10.3。服务器上只有一个密钥~/.ssh/authorized_keys
(这个密钥是 ECDSA p521 而不是 RSA),并且客户端里面有私钥和公钥~/.ssh
。问题是客户端不断发送所有可用的 RSA 密钥~/.ssh
- 请参阅此详细输出:
OpenSSH_7.2p2 Ubuntu-4, OpenSSL 1.0.2g-fips 1 Mar 2016
debug1: Reading configuration data /home/manuth/.ssh/config
debug1: /home/manuth/.ssh/config line 1: Applying options for r2d2.manuth.life
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to r2d2.manuth.life [103.12.163.90] port 900.
debug1: Connection established.
debug1: identity file /home/manuth/.ssh/dqar type 3
debug1: key_load_public: No such file or directory
debug1: identity file /home/manuth/.ssh/dqar-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2 FreeBSD-20160310
debug1: match: OpenSSH_7.2 FreeBSD-20160310 pat OpenSSH* compat 0x04000000
debug1: Authenticating to r2d2.manuth.life:900 as 'manuth'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ecdsa-sha2-nistp521
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp521 SHA256:awtuO9udROeroYOv3GJ8Z6xcHt4IQhjNkcKQ6eavuik
debug1: Host '[r2d2.manuth.life]:900' is known and matches the ECDSA host key.
debug1: Found key in /home/manuth/.ssh/known_hosts:10
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: manuth@wackypc
debug1: Authentications that can continue: publickey
debug1: Offering RSA public key: manuth@wackypc
debug1: Authentications that can continue: publickey
debug1: Offering RSA public key: manuth@wackypc
debug1: Authentications that can continue: publickey
debug1: Offering ECDSA public key: /home/manuth/.ssh/dqar
debug1: Server accepts key: pkalg ecdsa-sha2-nistp521 blen 172
debug1: Authentication succeeded (publickey).
Authenticated to r2d2.manuth.life ([103.12.163.90]:900).
即使我~/.ssh/config
在客户端上指定它,输出仍然相同:
host r2d2.manuth.life
IdentityFile ~/.ssh/dqar
Port 900
尝试从中删除所有键,keychain
但没有帮助。如果我将 RSA 公钥添加到服务器,然后在~/.ssh/config
客户端上指定 RSA 私钥,它会立即获取 RSA 密钥。