I recently ran into the following problem when trying to ssh into my Ubuntu 11.04 server:
ssh [email protected]
PTY allocation request failed on channel 0
I don't know for sure, but I think this happened after one of the latest Ubuntu updates I installed. In case it's of relevance, I'm remoting in from Terminal (Mac OS X 10.7 - Lion).
EDIT: It turns out that I can remote in as another user (i.e. matt) on my server... seems to me like that would point to SSH key problems. If I remote in from another account on the same client machine, it works fine for all users on the server.
SOLUTION: Turns out that I had gitolite configurations in my ~/.ssh/allowedkeys on the server side. I accidentally ran a configuration script some time ago as my user instead of as the git user. This was kicking off configurations upon remote (keys matched up) that disabled needed settings (see below). I removed the relevant fields from allowedkeys, and I was golden.
debug1: Remote: Forced command.
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Remote: Forced command.
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
PTY allocation request failed on channel 0