NSLU2: Using sftp-server with bash as shell

I’ve installed the bash shell on my Linksys NSLU2, and replaced the root’s shell with bash by editing the /etc/passwd file.

It worked fine, until I noticed that scp’ing to the NSLU2 didn’t work anymore… Reverting back to the sh shell, scp started to work again… The error was right after startup of scp it replied with “Connection closed”. No info on logs, what so ever.

I’m running SlugOS, and according to this thread: http://tech.groups.yahoo.com/group/nslu2-general/message/6537 it looked like a bash version bug.

Indeed I did have version 3.2-r2 installed… and so it would not work.

Because I have the optware repository enabled ( http://www.nslu2-linux.org/wiki/Optware/Slugosbe) I’ve checked that the bash version on this repository was newer. So:

– ipkg remove bash

– ipkg-opt install bash

– cp /opt/bin/bash /bin/bash

And while mantaining an open session, changed the shell to bash on one user and tried to logon. It worked.

And scp? It worked also, so with my finger’s crossed, I’ve changed again the root shell to bash, and logon on a new session. No problem. Indeed scp worked right away also.

So if any problems with scp failing, just upgrade your bash version.

Key words: sftp-server bash connection closed failed error 0

2 thoughts on “NSLU2: Using sftp-server with bash as shell

  1. Hello,

    Please could you tell me if i upgrade my slug can i run cron shell files to scp files to the slug? I want to use my slug to backup my websites using sftp and am not sure if that is possible before i upgrade my slug

    probably a dump question


    1. Hi!

      I’m using the latest version of SlugOS, and the cron daemon works without a hitch. I use it to keep my internet connection alive (router bug…) and to do my backups periodically. So you can do what you are describing, but if you are using an older version (which I used) I had problems with the cron daemon that wasn’t working. Upgrading did the trick.
      Hope this helps!

Leave a Reply to dave Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.