2

I have an SSH command that works fine from the command line but fails without a message when using the terminal program's New Remote Connection feature. For example, I set up a new connection in Terminal's New Remote Connection dialog as follows:

ssh user@server.domain.com -p 1022

This opens a new window as expected, but never connects and the window closes after a predictable amount of time. (Interestingly, the timing is different but consistent for each of two servers: 15 seconds on one and 75 seconds on the other).

If I open a local shell and paste the same command, it connects perfectly as expected. I can also connect to four other servers on the same domain using the New Remote Connection approach.

My specific question is, what's going on? But more generically, is there any way to see logging information or other clues from Terminal in the "New Remote Connection" mode?

Thanks.

migrated from serverfault.com Nov 18 '15 at 13:13

This question came from our site for system and network administrators.

1

You could check the log with the Console app.

It's probably quicker to see what's going on between the two hosts using tcpdump though. Just open another terminal tab/window and run

sudo tcpdump -i <en0> host server.domain.com
  • This is perfect. With this I could see that the server was not responding. I compared the non-working command to a working one and there was an extra space before the -p 1022. That space is acceptable from the command line, but seems to cause Terminal to ignore the rest of the line when it comes from the "New Remote Connection" dialog. Thanks! – Scott W Nov 17 '15 at 1:48
1

Add "-vvv" to your SSH command to enable extra verbosity on what's occurring in the background.

Run the same command from the command line (with the extra verbosity flags), and then compare the output.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy