Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Since this morning I cannot login normally on my server using SSH anymore.

Typically, when typing this:


The shell hangs and does not acquire shell. The last line of verbose with -vv gives me:

debug2: shell request accepted on channel 0

That said, if I launch a command directly in SSH, such as:

ssh 'ls ~' seems to work properly and it gives me the expected output. Actually, I can get a shell by forcing bash to launch in interactive mode, by typing:

ssh 'bash -i'

I also tried to disable my .bashrc file (by moving it to .bashrc_OLD), but it didn't seem to be of any help.

Any suggestion would be much appreciated, thanks!

Edit: I've also tried to login with sh, but it didn't work neither. Thus I believe this is not related to a profile file issue.

Edit 2: when I manage to get a shell using the -i flag, here is the additionnal message I get from the console:

bash: cannot set terminal process group (-1): Invalid argument
bash: no job control in this shell
share|improve this question

migrated from Oct 14 '13 at 10:13

This question came from our site for professional and enthusiast programmers.

I think you need to check the remote passwd database (by default /etc/passwd) and see what shell is there (you can then check it via running it directly like you already do with some commands). Other place to look for apart from shell dot files in your home directory is /etc/pam.d and then you should check your remote ~/.ssh directory as well especially if you're using keys to log in.

The terminal issue may mean that bash -i expects a terminal, which can be triggered by ssh -t (it's turned off by default when running a command directly).

share|improve this answer

Looks like you don't have /dev/pts mounted (on the server). Login by other means (physical console) and mount it with mount -tdevpts pts /dev/pts/ and then try again.

If you have no physical access to your server you can try from your client: ssh 'mount -tdevpts pts /dev/pts/' (not tested)

share|improve this answer

I've had similiar lags and found out that disabling reverse DNS solved the issue.


UseDNS no



restart and try

share|improve this answer
It didn't work, I'm afraid. Please also note that this is not just a lag, as it hangs indefinitely after "shell request...". – driscan Oct 14 '13 at 9:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .