1

I've looked and tried to find a way but I'm unsure of how to get LOCAL shell access on an ESXI machine.
I broke the sshd_config with the following change to the sshd_config file:

# Default > MACs hmac-sha1,hmac-sha1-96
MACs hmac-sha2-256,hmac-sha2-512,hmac-sha1

After making that change, then restarting the ssh service:

$ ssh -l root 10.240.19.22
ssh_exchange_identification: Connection closed by remote host

$ ssh -l root 10.240.19.22 -vvv
OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data /Users/user/.ssh/config
debug1: /Users/user/.ssh/config line 1: Applying options for *
debug3: kex names ok: [diffie-hellman-group1-sha1]
debug3: kex names ok: [diffie-hellman-group1-sha1]
debug3: kex names ok: [diffie-hellman-group1-sha1]
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug2: resolve_canonicalize: hostname 10.240.19.22 is address
debug2: ssh_connect_direct
debug1: Connecting to 10.240.19.22 [10.240.19.22] port 22.
debug1: Connection established.
debug1: identity file /Users/user/.ssh/id_rsa type -1
debug1: identity file /Users/user/.ssh/id_rsa-cert type -1
debug1: identity file /Users/user/.ssh/id_dsa type -1
debug1: identity file /Users/user/.ssh/id_dsa-cert type -1
debug1: identity file /Users/user/.ssh/id_ecdsa type -1
debug1: identity file /Users/user/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/user/.ssh/id_ed25519 type -1
debug1: identity file /Users/user/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/user/.ssh/id_xmss type -1
debug1: identity file /Users/user/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.9
ssh_exchange_identification: Connection closed by remote host

any thoughts for recovery? Thanks!

1 Answer 1

2

I think the only way to do this would be to treat the remote server as a local one:

  1. Get ILO/IPMI/KVM access to the remote server,
  2. Reboot
  3. When you reach the management console, launch a local shell as follows:

https://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.vcli.migration.doc_50%2Fcos_upgrade_technote.1.4.html

  1. Make your edits to sshd.conf and restart the service.
  2. Test remote SSH.
2
  • Haven't forgotten about this. I can make that reboot soon. I'll test it out and give you the ✔ Mar 13, 2019 at 20:24
  • was able to finally schedule a window to do this. worked fine. Thanks. Can't believe i didn't know this was a thing for this long... :-| Apr 5, 2019 at 14:54

You must log in to answer this question.

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