1. 修改dropbear配置:
cat /etc/config/dropbear
config dropbear
option PasswordAuth 'on'
option RootPasswordAuth 'on'
option Port '22'
# option BannerFile '/etc/banner'
修改为:
vim /etc/config/dropbear
config dropbear
option PasswordAuth 'on'
option RootPasswordAuth 'on'
option Port '22'
option Interface 'wan'
# option BannerFile '/etc/banner'
2. 使设置生效
/etc/init.d/dropbear restart
3. 关闭防火墙且禁止自启动
/etc/init.d/firewall stop
/etc/init.d/firewall disable
关于firewall:
/etc/init.d/firewall Syntax: /etc/init.d/firewall [command] Available commands: start Start the service stop Stop the service restart Restart the service reload Reload configuration files (or restart if that fails) enable Enable service autostart disable Disable service autostart
4. 免密码SCP传输文件
将电脑的id_rsa.pub拷贝到路由器/etc/dropbear目录下,
cat id_rsa.pub >> authorized_keys
chmod 600 authorized_keys
5. 重新启动路由器