I'm using Debian testing (squeeze/sid) and the SSH/SCP stopped working after my last distro-upgrade.
After executing the SSH client, the server was returning the error below:
Error:
ssh -v root@SSHserver
stdin: is not a tty
stdin: is not a tty
Solution 1: you have physical access to the machine
On the machine's console, log in as root and execute the following commands:
root@SSHserver# mkdir /dev/pts
root@SSHserver# mount -t devpts /dev/pts /dev/pts
root@SSHserver# mount -t devpts /dev/pts /dev/pts
Solution 2: you only have remote access to the machine
ssh to the target server again, but now remember to append a "/bin/sh" as the last argument. The "/bin/sh" on the command line basically tells the ssh client to ignore the normal logon process (which is not working) and to simply execute the "/bin/sh" right after the SSH authentication. This will give you a restricted shell on the target server instead of logging you on, but don't worry, you won't need anything else to fix the problem.
In order to execute the recovering procedures, you'll need root privileges, so remember to inform root as the user for the SSH authentication. After the authentication, the server will not return any sign of successful authentication. You will only be presented with a blinking cursor. To check whether you were successfully logged or not, you can simply type an 'ls' and check if you're actually seeing the remote server contents. After that, you can go ahead and execute the 'mkdir' and the 'mount' as shown in the box above.
user@remoteMachine$ ssh root@SSHserver /bin/sh
mkdir /dev/pts
mount -t devpts /dev/pts /dev/pts
mkdir /dev/pts
mount -t devpts /dev/pts /dev/pts
Try again
ssh to the the target server again and you'll be presented the Linux shell again :-D.
You might also add the following line to the /etc/fstab to make devpts be automatically mounted on the next time you reboot the machine:
none /dev/pts devpts defaults 0 0
Well, that's all. If you have any question or similar solution, please leave a comment.
Marcadores: notepad