2

I'm trying to ssh to a machine that opens the port 8012 for ssh as opposed to port 22. When I ssh at the command line (ssh -p 8012 username@host), nothing happens. The -vvv option gives no pertinent information other than "trying to connect".

I can do ssh ssh://[email protected] (on standard port 22) without problems.

Further, on this Mac I have a VM running Debian. Within this VM I can ssh on the machine with the non-standard port 8012 without problems.

I also have a separate Windows machine where I also have no problems doing what I described.

Edit: output of ssh -vvv ...:

OpenSSH_8.1p1, LibreSSL 2.7.3
debug1: Reading configuration data /Users/[username]/.ssh/config
debug1: /Users/[username]/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 47: Applying options for *
debug1: Connecting to [destination] port 8012.

And then it gets stuck there.

Output of cat ~/.ssh/config:

  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_rsa

Uncommented lines of the output of cat /etc/ssh/ssh_config:

Host *
    SendEnv LANG LC_*
12
  • Assuming you’re not trying to do port forwarding since it’s working on Ubuntu, did you reconfigure sshd_config to listen on port 8012?
    – Allan
    Commented Mar 30, 2020 at 18:30
  • @Allan I don't control the ssh serving machine.
    – screwnut
    Commented Mar 31, 2020 at 8:46
  • If it’s not configured to listen on that port, it’s not going to connect. Did you configure the port in Ubuntu or is it too, something you don’t have control over?
    – Allan
    Commented Mar 31, 2020 at 8:55
  • @Allan Are you talking about the server or my computers? The server is perfectly fine and hundreds of people are connecting to it. I just can't conenct to it from my Mac but I can from a VM within the Mac and from another machine running Windows. My question is really "how can I analyze and debug my problem since it's clearly something wrong with the Mac?"
    – screwnut
    Commented Mar 31, 2020 at 8:58
  • 2
    Are you running 10.15.4 by chance? See mjtsai.com/blog/2020/03/31/macos-10-15-4-broke-ssh, there are some potential workarounds in the comments there. If one of them works for you, please post it as an answer.
    – nohillside
    Commented Apr 1, 2020 at 14:48

1 Answer 1

1

It appears my issue is specifically tied to a recent update of MacOS. The answer was found here: https://mjtsai.com/blog/2020/03/31/macos-10-15-4-broke-ssh/. Specifying the IP address of the server rather than its name resolved my issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .