VMware Cloud Community
Snify
Contributor
Contributor

ssh tunnel ability (sshd_config)

I am trying to configure ESXi's host sshd_config file and added  "GatewayPorts yes" to enable port-forwarding

After that, I restarted ssh and used the auto-backup.sh script to save my changes.

My goal ist to access my SSH-VMs via the ESXI Host through SSH, hence

ssh -L 9999:MYVMHOSTNAME:22 -N MYESXIHOSTNAME

doesn't let me connect to the local 9999 port

however this works:

ssh -L 9999:MYESXIHOSTNAME(or localhost):443 -N MYESXIHOSTNAME // ESXI Web-Interface Example

Is there anything I miss, such as firewall stuff or even sshd_config changes to make the ESXI Host connect to other hosts at all?

Any help is apreciated, thank you.

PS.: My ESXI Host and all my VMs in it, are connected to the same "router", hence they are accessible through each hostname or specified ip-address.

(I have a Oracle Linux VM and I can use SSH-Tunneling just fine by connecting from the VM to my ESXI Host via SSH)

Tags (3)
2 Replies
sbweeden
Contributor
Contributor

Did you ever figure this out? I am trying to solve the same problem. I'm hoping it's some settings in the /etc/ssh/sshd_config but if it is I haven't figured out what they are yet...

Tags (1)
Reply
0 Kudos
virtsysadmin
Enthusiast
Enthusiast

changing sshd_config something not recommended in production, SSH is only for trouble shooting, that is why you are getting the warning when enabled ssh on ESXi. 



I am a VMware employee, But I contribute to VMTN voluntarily (ie. not in any official capacity)
VCIX-DCV 2020|CKA|VCP|VCP vSphere 7|MCTS|RHCA|CCNA|ITIL| Master Specialist - VMware Cloud on AWS 2021
Please hit resolved, when your question has been answered.
Reply
0 Kudos