How to fix request failed on channel 0

后端 未结 20 2563
甜味超标
甜味超标 2020-12-04 16:42

When I want to connect to my server like this

ssh -a username@my-server.de -p 22

it gives me two error messages:

PTY alloca         


        
相关标签:
20条回答
  • 2020-12-04 17:05

    This is what which helped me from the various answers provided.

    • Try logging in as root, that will get you in most of the times
    • Try logging in as a different user, it successful, it means that the problem is with a specific account & it implies that there are some process(es) already started by the problematic account which are consuming resources preventing login(most likely no of processes)
    • Increase the limit in /etc/security/limits.d/20-nproc.conf as mentioned by xmduhan above
    • Try to ssh again, it should work
    0 讨论(0)
  • shell request failed on channel 0

    mean you don't have shell or remote commands access, fix your user permission on server to have shell access or if you just want tunneling use -N and -T options

    0 讨论(0)
  • 2020-12-04 17:07

    Try this:

    vi /etc/security/limits.d/20-nproc.conf
    *          soft    nproc     4096   # change to 65535 
    root       soft    nproc     unlimited
    
    0 讨论(0)
  • 2020-12-04 17:08

    Should a person find themselves reading this QA while they are trying to ssh into a NetGear ReadyNAS device, be sure that the "rsync only" checkbox is unchecked in the dialog box for the ssh service in the admin interface.

    0 讨论(0)
  • 2020-12-04 17:10

    remounting /dev/pts works for me. you can do this remotely via ssh if you run ssh like this against the affected machine. ssh doesn't request a tty when running commands like this and therefore this will allow you to remount /dev/pts remotely

    ssh user@host -- 'mount -o remount,rw /dev/pts'

    0 讨论(0)
  • 2020-12-04 17:10

    Just rebooting a AWS instance works for me to clear the error "shell request failed on channel 0"

    0 讨论(0)
提交回复
热议问题