User Tools

Site Tools


inbox:replacingdropbearbyopensshserver

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Previous revision
inbox:replacingdropbearbyopensshserver [2012/09/06 09:55]
inbox:replacingdropbearbyopensshserver [2016/04/06 20:36] (current)
highpost
Line 1: Line 1:
 +====== Replacing Dropbear by openssh-server ======
  
 +{{page>​meta:​infobox:​wip&​noheader&​nofooter&​noeditbtn}}
 +
 +  * Make sure you have set a root password:<​code>​passwd</​code>​
 +
 +  * Change the Dropbear port to an unused/free one on your box and restart Dropbear:<​code>​uci set dropbear.@dropbear[0].Port=2222
 +uci commit dropbear
 +/​etc/​init.d/​dropbear restart</​code>​
 +
 +  * Reconnect to your router via SSH on the configured port above:<​code>​ssh -p 2222 root@192.168.1.1</​code>​
 +
 +  * Install the openssh-server<​code>​opkg update
 +opkg install openssh-server</​code>​
 +  ​
 +  * On CC 15.05+, if you want to be able to use a password for root login, edit /​etc/​ssh/​sshd_config and change<​code>#​PermitRootLogin without-password</​code>​ to <​code>​PermitRootLogin yes</​code>​
 +
 +  * Enable and start OpenSSH server. OpenSSH will listen now on port 22.
 +  * <​code>/​etc/​init.d/​sshd enable
 +/​etc/​init.d/​sshd start</​code>​
 +
 +  * Reconnect to your router via SSH on port 22. If this fails to authenticate with the root password on port 22, you should still be able to connect with Dropbear on port 2222. Test this first and then reboot OpenWRT. After that you should be able to connect with OpenSSH on port 22.
 +
 +  * Now you can disable Dropbear<​code>/​etc/​init.d/​dropbear disable
 +/​etc/​init.d/​dropbear stop</​code>​
 +
 +  * Install the ''​openssh-sftp-server''​ package to install support for the SFTP protocol which SSHFS uses<​code>​opkg update
 +opkg install openssh-sftp-server</​code>​
 +
 +  * Don't forget to configure the openssh server in /​etc/​ssh/​sshd_config