AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-379366

Manuth Chek's questions

Martin Hope
Manuth Chek
Asked: 2016-11-17 22:16:10 +0800 CST

通过端口号限制 Mikrotik 路由器的带宽?

  • 1

我有一个 Mikrotik 路由器 (RB951G-2HnD),它用作主路由器,将 HTTP/HTTPS 和 Plex 的端口转发到 NAT 后面的服务器。现在由于没有太多的上传带宽(15Mbps),我很想限制 WAN 接口上 HTTP/HTTPS 的带宽,以便为 Plex 留下一些带宽。我一直在寻找,/queue但没有看到任何受端口号限制的东西。

mikrotik bandwidth-control
  • 2 个回答
  • 10768 Views
Martin Hope
Manuth Chek
Asked: 2016-11-07 21:02:10 +0800 CST

SSH 显然没有读取 ~/.ssh 中的密钥

  • 7

这是 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。

ssh
  • 2 个回答
  • 30346 Views
Martin Hope
Manuth Chek
Asked: 2016-10-08 20:13:33 +0800 CST

OpenSSH 客户端不断发送 RSA 密钥而不是 ECDSA

  • 5

客户端是 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 密钥。

ssh ssh-keys
  • 1 个回答
  • 4143 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve