cannot ssh after upgrade to mojave

I recently upgraded my Macbook Pro OS to Mojave and I cannot ssh out anymore. Any host I try gives me the error:


ssh: Could not resolve hostname my.server.com: -65568


It used to work just fine before. Is there any setting I need to tweak?


-Navjeet

MacBook Pro (Retina, 15-inch, Mid 2014), macOS Mojave (10.14)

Posted on Nov 12, 2018 5:27 PM

Reply

Similar questions

7 replies

Nov 12, 2018 7:03 PM in response to navjeetc

Do connections work when booted in Safe Mode? (That’ll also flush and rebuild thr boot caches, and temporarily disable some of the add-on kext bits that might be present in the configuration.)


Are the IP addresses for the translations matching the IP addresses you’re expecting?


You mention having “commented others”, as in you’ve modified that file? Recently?


Any cracked apps? Some of those have caused weird problems.


Any add-on anti-malware or anti-virus tools, add-on networking such as Little Snitch, or cleaners or optimizers around? If so, remove those per the vendor instructions, and test.


As a test of your router and its DNS (presumably) forwarding, switch your DNS server setting to one of 1.1.1.1, or 8.8.8.8, or 9.9.9.9; those are Cloudflare public DNS, Google public DNS, and the IBM quad-9 public DNS, respectively.


As for the active interfaces, are you using both wired and Wi-Fi? It would appear you’re using just one active network link (en0), from that config dump.

Nov 12, 2018 6:20 PM in response to navjeetc

Do you have local DNS running on a NAT‘d network? If so, are all DNS server references solely to the local DNS server, and with no references to public DNS servers? (Your reply shows an IP address, but not whether you are running a DNS server. If you don’t know if you’re running a DNS serverand haven’t been setting up host names and IP addresses somewhere, you’re probably not running a DNS server.)


How many active network interfaces? One? More than one?


I don’t have a Mojave system handy to test, but here are the common equivalents of the nslookup and dig commands:

$ dscacheutil -q host -a name host.example.com

name: host.example.com

ip_address: 172.16.1.2

$ dscacheutil -q host -a ip_address 172.16.1.2

name: host.example.com

alias: 2.1.16.172.in-addr.arpa

ip_address: 172.16.1.2

$


Does adding -vvv onto the ssh connection attempt show anything interesting?


Anything added in /etc/hosts?


Anything interesting from a traceroute to the target host?

Nov 12, 2018 6:57 PM in response to MrHoffman

As far I know I do not have DNS server running. I have fios router at ip 192.168.1.1


No different results with dscacheutil -q host -a name host.example.com (same as nslookup)

BTW I can ssh with IP, so it is a pure DNS issue. Nothing special in /etc/hosts anymore. Only 127.0.0.1 entries, I commented others.

And I also cannot connect to AppStore.

traceroute fails like ssh also

Not sure about number of network interfaces but here is the output from "ifconfig"


lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384

options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>

inet 127.0.0.1 netmask 0xff000000

inet6 ::1 prefixlen 128

inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1

nd6 options=201<PERFORMNUD,DAD>

gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280

stf0: flags=0<> mtu 1280

XHC20: flags=0<> mtu 0

en1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500

options=60<TSO4,TSO6>

ether 72:00:06:b7:8f:80

media: autoselect <full-duplex>

status: inactive

en2: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500

options=60<TSO4,TSO6>

ether 72:00:06:b7:8f:81

media: autoselect <full-duplex>

status: inactive

en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500

ether 6c:40:08:ba:7a:e4

inet 192.168.1.7 netmask 0xffffff00 broadcast 192.168.1.255

inet6 fe80::1ca5:3f62:df45:a85b%en0 prefixlen 64 secured scopeid 0x7

nd6 options=201<PERFORMNUD,DAD>

media: autoselect

status: active

p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304

ether 0e:40:08:ba:7a:e4

media: autoselect

status: inactive

awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484

ether be:b0:a8:75:64:6a

inet6 fe80::bcb0:a8ff:fe75:646a%awdl0 prefixlen 64 scopeid 0x9

nd6 options=201<PERFORMNUD,DAD>

media: autoselect

status: active

bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500

options=63<RXCSUM,TXCSUM,TSO4,TSO6>

ether 72:00:06:b7:8f:80

Configuration:

id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0

maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200

root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0

ipfilter disabled flags 0x2

member: en1 flags=3<LEARNING,DISCOVER>

ifmaxaddr 0 port 5 priority 0 path cost 0

member: en2 flags=3<LEARNING,DISCOVER>

ifmaxaddr 0 port 6 priority 0 path cost 0

nd6 options=201<PERFORMNUD,DAD>

media: <unknown type>

status: inactive

utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000

inet6 fe80::a935:51e7:b98d:486f%utun0 prefixlen 64 scopeid 0xb

nd6 options=201<PERFORMNUD,DAD>

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

cannot ssh after upgrade to mojave

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.