Resolving ssh login problems

Common SSH problems

If you run into an SSH problem, share your issue here, and we can see if there is a simple solution. In some places local internet settings might prevent you from being able to ssh to a server.

Q : After launching a VM I get an error connecting similar to "network unavailable"
A : If you have just launched a VM, you may find that it is not available strait away. Wait for a few minutes and try again.

Q : When I try to ssh to a new server I get a warning about a host key change
A : The first time you connect to a server via SSH a key is stored for that server. If you then destroy that server, and reconnect to a new server, using the same IP, there will be a missmatch between the server key and the key your computer has stored. To resolve this, you have to remove the old key from a file called known_hosts.

To do this open the file known_hosts using a text editor (here I use vi)

vi ~/.ssh/known_hosts

within this file search for the line containing the key you wish to remove; the line with keys will look something like this; some-text-here

You need to delete the whole line (removing the IP, the text next to it and the key - the long string of characters). Once you have done this you should be able to ssh without a problem.

Is there an issue with X11 forwarding? I get the following message “X11 forwarding request failed on channel 0” when I ssh in (with or without -X), and it also fails when I access through putty.

The following got X11 forwarding working for me on a GVL image, first make sure x11-apps is installed (it may not be, depends which VM image you’re using):

sudo apt install x11-apps

Edit the /etc/ssh/sshd_config file as sudo and add this line and save:

X11UseLocalhost no

Restart ssh:

sudo restart ssh

Try logging in again and X11 forwarding should be working (you might get an error message about the file .Xauthority file not existing but it should be automatically created):

ssh -X ubuntu@YOURIP

To test try:


I have a problem to login into one of my instances on which I actively worked for the past 2 weeks. Bellow is the result of ssh -vv . I have changed nothing since my last login yesterday: I use the same comp, the same network. I can access without a problem all my other instances though. Could you help me to fix it, please?
Thank you,

ssh -vv ubuntu@
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to [] port 22.
debug1: connect to address port 22: No route to host
ssh: connect to host port 22: No route to host

Some instances running on Warwick might be unstable since yesterday (19th), about 5pm. Work in progress.


Im having some problems SSH to a server I have at Birmingham. It has previously worked fine and new servers launch fine with no problems. It looks like an authentication issue:

After entering username, I receive the error: “Server refused our key”
and “Disconnected: No supported authentication methods available (server sent: public key)”

Any help much appreciated,



Hi Richard - I’ve rebooted this VM, please could you try SSH again?

Hi Matt,

Fixed! Thanks for your time- really appreciate it.


1 Like

No worries, sorry it took so long to get back to you. Glad everything is working again!

Please start a new thread for current issues