ssh连接openwrt_如何将SSH无密码连接到OpenWrt路由器?
ssh连接openwrtThe good ssh-copy-id method which works well on common Linux seems not working for OpenWrt router. 良好的ssh -copy-id方法在普通Linux上运行良好,似乎不适用于OpenWrt 路由器 。How to Passwordless SSH to an OpenWrt..
ssh连接openwrt
The good ssh-copy-id
method which works well on common Linux seems not working for OpenWrt router.
良好的ssh -copy-id
方法在普通Linux上运行良好,似乎不适用于OpenWrt 路由器 。
How to Passwordless SSH to an OpenWrt Router?
如何将SSH无密码连接到OpenWrt路由器?
OpenWrt’s SSH server is Dropbear. It can accept normal RSA keys. But the authorized_keys location is not the same as the openssh “~/.ssh/authorized_keys”.
OpenWrt的SSH 服务器是Dropbear。 它可以接受普通的RSA密钥。 但是,authorized_keys的位置与openssh“〜/ .ssh / authorized_keys”的位置不同。
The location for the authorized_keys is
authorized_keys的位置是
/etc/dropbear/authorized_keys
What you need to do is to put your public key to that file. If you use the default key location ~/.ssh/id_ras.pub
, you can do it by this command:
您需要做的是将公共密钥放入该文件。 如果使用默认键位置~/.ssh/id_ras.pub
,则可以通过以下命令进行操作:
ssh root@YOUR_OPENWRT_ROUTER
cp /etc/dropbear/authorized_keys /etc/dropbear/authorized_keys.bak
cat ~/.ssh/id_rsa.pub
| ssh root@YOUR_OPENWRT_ROUTER "cat >> /etc/dropbear/authorized_keys"
翻译自: https://www.systutorials.com/how-to-passwordless-ssh-to-an-openwrt-router/
ssh连接openwrt
更多推荐
所有评论(0)