openwrt 替换Dropbear by openssh-server

转自:

http://wiki.openwrt.org/inbox/replacingdropbearbyopensshserver


Replacing Dropbear by openssh-server

  • Change the Dropbear port to an unused/free one on your box and restart Dropbear
    uci set dropbear.@dropbear[0].Port=2222
    uci commit dropbear
    /etc/init.d/dropbear restart
  • Make sure you have set a root password before rebooting
    passwd
  • Reconnect to your router via SSH on the configured port above
  • Install the openssh-server
    opkg update
    opkg install openssh-server
  • Enable and start OpenSSH server. OpenSSH will listen now on port 22
    /etc/init.d/sshd enable
    /etc/init.d/sshd start
  • Reconnect to your router via SSH on port 22
  • Now you can disable Dropbear
    /etc/init.d/dropbear disable
    /etc/init.d/dropbear stop
  • Install the  openssh-sftp-server package to install support for the SFTP protocol which SSHFS uses
    opkg update
    opkg install openssh-sftp-server
  • Don't forget to configure the openssh server in /etc/ssh/sshd_config

猜你喜欢

转载自blog.csdn.net/xyyangkun/article/details/42816551
今日推荐