Results 1 to 5 of 5
Hello,
I recently upgraded a FreeBSD box from 6.3 to 7.4, however, I didn't realise the requirement of compat6x before the final upgrade install.
It leaves Bash broken because of ...
- 05-13-2011 #1Just Joined!
- Join Date
- Nov 2006
- Posts
- 25
How to switch Shell over SSH?
Hello,
I recently upgraded a FreeBSD box from 6.3 to 7.4, however, I didn't realise the requirement of compat6x before the final upgrade install.
It leaves Bash broken because of a failed dependency (Shared object "libncurses.so.6" not found, required by "bash")
Which means I can't login either at the console or via SSH because it dumps me out immediately after logging in. I am the only Wheel user with my default shell set as Bash. I know /bin/sh is unaffected by this because I can log into via the console as root and roll back the upgrade. Second time of upgrading the same problem, but I have no access to the console this time to roll it back.
How can I log in via SSH using a different shell from Bash so I won't be dumped out? I can't log in as root via SSH because of the security and I am the only member of the Wheel group.
Any help will be very useful.
Thanks
Will
- 05-14-2011 #2
From the man page: "If command is specified, it is executed on the remote host instead of a login shell."
So maybe this will do the trick?
Code:ssh <USER>@<HOST> /bin/sh
You must always face the curtain with a bow.
- 05-14-2011 #3Just Joined!
- Join Date
- Nov 2006
- Posts
- 25
Hi,
Thanks, I did try that yesterday and again just now but it still dumps me out with the same error.
Any other suggestions?
- 05-25-2011 #4
unconventional but may be possible
upload via rsync (or scp) your missing
libncurses.so.6
to the correct path/folder from your laptop to the server
if it is but that one file missing, then it may work
- 07-10-2011 #5Linux User
- Join Date
- Jan 2005
- Location
- Saint Paul, MN
- Posts
- 262
Yes, this is the way to run a different shell (or any command.) The problem is that "/bin/sh" is most likely a symbolic link to "/bin/bash".
Another option for a shell is to not use a standard shell. For example "/bin/vim", which lets you issue commands via the
So try:Code::!commandline complete with arguments
Other possible non-shell alternatives:Code:ssh <USER>@<HOST> /bin/vim
Are other shells installed? Other ideas are is telent or ftp installed. Running them via ssh might work as they allow executing commands on the local machine which would be the server when you connect via ssh to execute the command.Last edited by alf55; 07-10-2011 at 08:10 PM. Reason: added vim


Reply With Quote

