pkg_delete bash, logged out by accident, can't ssh back in (not good)

firmdog at gmail.com firmdog at gmail.com
Sat Sep 27 13:14:20 UTC 2014


> ssh -t user at box.org /bin/sh works for me

Just tested this on my laptop. That command does NOT work. It does
work if the default shell port package is still installed.

Try this:

You must make bash the default shell for root. Then run, say,
"pkg_delete bash-4.2.42"

Log out. You will not be able to ssh or log back in with that command.
I am on 8.4.

I can't even log onto the local console.

Yes, I kept a couple sessions open so I didn't lock myself out of the
laptop.  :-)




On Sat, Sep 27, 2014 at 1:03 AM, Vikash Badal <Vikash.Badal at is.co.za> wrote:
> On 27/09/2014 00:20, Valeri Galtsev wrote:
>>
>> On Fri, September 26, 2014 4:14 pm, firmdog at gmail.com wrote:
>>> Oh boy. I have only 2 accounts on this box. Root and one other
>>> account. Both use bash as default.
>>>
>>> I am completely locked out of this box on the command line?
>>>
>>
>> One thing I would try is
>>
>> ssh user at box.org exec /bin/sh
>>
>
> ssh -t user at box.org /bin/sh works for me
>
>
>> replace with your username and machine name. I am on the road with little
>> ability to test it, so my apology about my stupidity (as it likely will
>> try to invoke default shell first to then execute what exec requests...)
>>
>> Valeri
>>
>>>
>>>
>>>
>>>
>>> On Fri, Sep 26, 2014 at 5:01 PM,  <kpneal at pobox.com> wrote:
>>>> On Fri, Sep 26, 2014 at 04:51:32PM -0400, firmdog at gmail.com wrote:
>>>>> I did a pkg_delete of bash and was going to make install a new one
>>>>> from the port, due to shellshock. I logged out by accident, and when
>>>>> try to login via ssh, it won't take my password. I assume I can't
>>>>> login because the default shell is bash, which has been removed right?
>>>>
>>>> Sounds like it.
>>>>
>>>>> Any ideas on how I can get into my remote freebsd box via ssh?
>>>>
>>>> Use a different remote account with a different shell.
>>>>
>>>>> Workarounds?
>>>>
>>>> None.
>>>> --
>>>> Kevin P. Neal                                http://www.pobox.com/~kpn/
>>>>
>>>>  "Good grief, I've just noticed I've typed in a rant. Sorry chaps!"
>>>>                             Keir Finlow Bates, circa 1998
>>> _______________________________________________
>>> freebsd-questions at freebsd.org mailing list
>>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>>> To unsubscribe, send any mail to
>>> "freebsd-questions-unsubscribe at freebsd.org"
>>>
>>
>>
>> ++++++++++++++++++++++++++++++++++++++++
>> Valeri Galtsev
>> Sr System Administrator
>> Department of Astronomy and Astrophysics
>> Kavli Institute for Cosmological Physics
>> University of Chicago
>> Phone: 773-702-4247
>> ++++++++++++++++++++++++++++++++++++++++
>> _______________________________________________
>> freebsd-questions at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"


More information about the freebsd-questions mailing list