Failing to connect to server via SSH - "Server refused to allocate pty"
Solution 1:
Did you tried to re-create pty and tty devices ?
[email protected]:~# /sbin/MAKEDEV tty
[email protected]:~# /sbin/MAKEDEV pty
It seems to be a known issue on virtual servers...
If you don't have access to any shell, you could try sending the command via ssh :
florian@localmachine:~$ ssh [email protected] "/sbin/MAKEDEV tty"
florian@localmachine:~$ ssh [email protected] "/sbin/MAKEDEV pty"
Edited to reflect your comment :
If you use a chroot, you also have to mount /proc, /dev and /sys :
root@h1696522:/# mount -o bind /proc /repair/proc
root@h1696522:/# mount -o bind /dev /repair/dev
root@h1696522:/# mount -o bind /sys /repair/sys
It should work now.
Solution 2:
If you have console access
mount devpts /dev/pts -t devpts
Solution 3:
The times I have encoutered this error I fixed it certifying that the udev package was installed and running. Udev takes care of creating device nodes when they are needed, like the PTS/x that are needed by ssh. Give it a try.
Solution 4:
Try this:
ssh root@host "mount -o remount /dev/pts"