Sometimes the ssh to remote server may take a long time to connect. This is because the ssh config tries to authenticate with GSSAPI which may be enabled in the server.
Doublecheck if that is the case using the -v option :
ssh -v firstname.lastname@example.orgIf you get this particular line on the screen,
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
where gssapi-with-mic is mentioned, then GSSAPI is enabled.
To reduce the time and workaround this problem, create a config file at
~/.ssh (in your home folder). Call the file
Add the following credentials.
Host (Put the name of the host here)
You should be sorted after this.
If you do get an error , your ssh may not have been compiled with GSSAPIAuthentication ( which is the case in Ubuntu 10.04) . Unless you want to recompile your ssh with extra options, you should be probably talking to the system admin of the server to disable the authentication or other workarounds.