![]() |
How can I upgrade OpenSSH if I'm connected to the NSLU2 via SSH? If I try to upgrade whilst connected via SSH, the connection is dropped and then no further login is possible
Upgrading OpenSSH when you're logged in via OpenSSH is unfortunately not a good thing to do. Fortunately there is a solution: enable telnet on the NSLU2 via http://192.168.1.77/Management/telnet.cgi (Note: This has been removed as of R29), then telnet into the NSLU2 and type ' To do this without having to type the root password over telnet:
notice: somehow on my nslu with R29 telnet is possible. notice: following the dropbear-way wont work because it wants to install ssh, which is already installed in a minor version. found no way to ignore this dependency. OpenSlug 3.1 Dropbear to openssh First off you can install all the regular openssh client utilities without any issue
Now first we need to change dropbear's default port Edit Change: DROPBEAR_PORT=22 to another unused port (I used 10000) DROPBEAR_PORT=10000 If you just restart dropbear at this point your connections will be lost, this is what I did and dropbear did not seem to restart ok so I could not reconnect. I then rebooted and was fine. I suggest you first do this:
This should fail when trying to start sshd but that is ok, edit Uncomment:
to:
Ok now reboot, when the NSLU2 comes back up openssh should be running on port 22 and dropbear on 10000. You may now want to unistall dropbear or leave it as a backdoor. For those interested in a bit more security, it is usually considered safer to not allow root to ssh into the host, but instead have a non-privilaged user to connect to and then su to root if you need to. For that configuration, you need to create the non-privilaged user and then make sure that the Here are the commands I used to set up a user "foo".
101 is the user's ID. This can be anything as long as it isn't already being used. 100 is the group id for the Another solution is to use screen.
Now the install will continue even if you are disconnected. |