Forums

SSH access fail: Server refused to allocate pty

Hi,

I got the error in the title and cannot log in via SSH now. It was working last week.

Bash console in Dashboard is working just fine.

Br, aerialist

I'm connecting OK to ssh.pythonanywhere.com using a Windows FTP client (Ipswitch WS_FTP Pro).

Server type: SFTP/SSH, port 22.

HTH Jim

Thanks for letting us know. I've checked the ssh system and it looks OK at the moment. Could you try again and see if it was just a glitch?

Thanks, jgmdavies and giles!

I tried again now but still got same error.

Very strange thing is that I can successfully connect GIT and SFTP (via SSH) and only fail for SSH terminal. Does the error message "Server refused to allocate pty" mean something to explain the difference?

I use WinSCP as SFTP client, GIT for Windows by GitHub as GIT client and Putty as SSH terminal.

Thanks for the update. It makes sense that this is only happening when you try to start an ssh terminal, but not for git and sftp -- ptys are "pseudo-terminals", which are only created for interactive sessions, so git and sftp don't need them.

What's odd is that it's happening for you, but not for jgmdavies. On the plus side, however, I've found a way of reproducing it for my own account now, so I'm able to do some debugging. Will post back here when I have a fix.

OK, it looks like the only fix is to reboot one of our servers. ssh access will be out for a few minutes, and unfortunately some web-based consoles will be closed.

Reboot completed, but it looks like it didn't fix the problem. Investigating further.

@giles FYI, I'm only using FTP type access, not temrinal.

Jim

I can login using putty 0.63 for Windows using:

ssh.pythonanywhere.com port 22 my usual username and password

Jim

OK, we have something. ssh servers also double up as servers for web-based consoles. It looks like anyone who had previously started a console on that specific server can't ssh in right now. That would explain why Jim doesn't see the problem (by pure chance he's never happened to start a web-based console on that server), but aerialist does -- he has.

Looking for a solution...

OK, we have a solution. I've tested it against the account of mine that was failing, and it fixed the issue. We're now running it against every user who's logged into that server, which will take a little while. However, it's running in alphabetical order, so @aerialist has already been processed and should work fine. Let me know if you still have any problems!

OK, everyone's been processed by our script -- logging in by ssh should work OK now.

Thank you for investigating and fixing the issue, giles!

I confirmed that I can SSH successfully now.

Excellent, thanks for confirming!

I can't seem to connect via SFTP/SSH (port 22) to ssh.pythonanywhere.com at the moment. In my Windows client (WS_FTP Pro), I get:

Error 83ed274c receiving sftp packet
error 83ed274c initializing sftp protocol
Sending channel close message for channel 0760a2ce
SSH Transport closed.

?

This is better now ;---)

Thanks for confirming -- we had a few problems with one of our servers around when you posted this -- it was sorted fairly quickly.

I am unable to log in due to a runtime error when trying to connect to ssh.pythonanywhere.com using WinSCP with the usual username and password on port 22. What should I do?

What is the error?

I was somehow able to SSH login.

All right, let us know what kind of errors you see if that happens again.