本文共 984 字,大约阅读时间需要 3 分钟。
ssh连接openwrt
The good -copy-id
method which works well seems not working for OpenWrt .
良好的 -copy-id
方法运行良好似乎不适用于OpenWrt 。
How to Passwordless SSH to an OpenWrt Router?
如何将SSH无密码连接到OpenWrt路由器?
OpenWrt’s SSH 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.bakcat ~/.ssh/id_rsa.pub | ssh root@YOUR_OPENWRT_ROUTER "cat >> /etc/dropbear/authorized_keys"
翻译自:
ssh连接openwrt
转载地址:http://szlwd.baihongyu.com/