Why can't I use the terminal any more with Lion?
February 6, 2012 11:02 AM   Subscribe

At work, there is a MacPro that I routinely use remotely via SSH, but have only sporadic physical access to. Someone else upgraded it to Lion (from Snow Leopard), and since then, I am unable to use the terminal locally or to log into it via SSH - in either case, the process immediately terminates / disconnects. Other user accounts on the same machine are not affected. What could be going on?
posted by kickingtheground to Computers & Internet (6 answers total) 1 user marked this as a favorite
 
You should type
ssh -vvv user@machinename
to get a full debug output. That might help you figure it out yourself, or paste it here and one of us could decipher it.
posted by hariya at 11:07 AM on February 6, 2012


Since you can't use the terminal locally, I'm betting this isn't something to do with ssh. Have the administrator of that machine check to make sure your shell is set to something normal (/bin/bash is normal for most linux distros, I'm not a Mac guy so I don't know if they default to tcsh or something):

grep yourusername /etc/passwd

...and look at the last field (fields separated by colons). Also have them check to see if they can do (from root):

su - yourusername

...without the session being terminated (the dash is important, it means to act exactly like you logged in). If they can do both then I'm wrong and something else is going on. If the shell looks normal in /etc/passwd but they get logged out when doing su, then something weird is in your login scripts. I'd check ~yourusername/.bashrc for something suspect.
posted by axiom at 11:36 AM on February 6, 2012


Response by poster: Yeah, I suspected .bashrc / .bash_profile too, so I copied them over from a working account on another Lion machine and that didn't fix it.

I'll check /etc/passwd when I next get to the machine in person.
posted by kickingtheground at 11:42 AM on February 6, 2012


Some good advice her already. A hunch says that following may find that your shell of choice is no longer installed
posted by mce at 11:51 AM on February 6, 2012 [1 favorite]


Dumb question, but can you check Console.app on the mac for any syslog-like messages? A successful login doens't print much, just "sshd: USER_PROCESS: 91975 ttys001", but maybe it will log something for your failures. And yes, hariya's suggestion to use verbose output on the ssh client is where you should start.
posted by Nelson at 12:31 PM on February 6, 2012


This is a very stupid suggestion that probably doesn't apply to your situation at all, but have you checked to see if anyone installed DenyHosts or something similar?

I once spent half a day trying to figure out why I couldn't log into a remote machine before realizing that it was running DenyHosts and my cablemodem had picked up an IP address that was already listed in hosts.deny
posted by RonButNotStupid at 1:53 PM on February 6, 2012


« Older Imagine if Alton Brown or Mark Bittman wrote an...   |   Credit Filter: Why does TransUnion hate me? Newer »
This thread is closed to new comments.