Skip to main content


Hey #Linux friends (and enemies) I have a weird #SSH question.

If I try to SSH into a server, I get a timeout. If I try to SCP some files to it, it works!

What's going on?

The server has an entry in ~/ssh/config

This fails: ssh server
This works: scp text.txt server:/path/

Can any shed some light on why one works and the other doesn't?

The "verbose" options in ssh stack, so -v is useful but -vvvv is All The Things. Whenever I've had an SSH problem the answer was in -vvv or -vvvv somewhere.
@mhoye I'll try again when it next hangs. Thanks.
@mhoye @fuzzface
Here's the -vvvvv output.
Nothing obvious I can see. It authenticates, connects, then hangs.
Output of an SSH session.

@silverwizard Yes, there is a shell. I can usually log in after a few minutes.

I'm trying to work out why ssh hangs while scp can transfer files.

@Terence Eden yeah, I just often see a hang when my shell is missing. If it can login after a few minutes that's .... weirder.

Those ignored envs seem odd.