简体   繁体   中英

ssh to openstack instance from other then controller node

I have an openstack(microstack) instance running on my server (ubuntu 20.04): S1. I have an ubuntu (20.04) instance up and running on it (floating ip 10.20.20.100), on which ping 8.8.8.8 works. I can ssh and ping this instance with FIP from the controller node/S1.

My intention is to access this server from my local machine (!=S1) (via WSL) with the floating IP. LOCAL_PC(WSL)$> ssh 10.20.20.100

I'm looking into using NAT (S/D) but I could use some clarification on what is the proper way of performing such forwarding!

Thank you in advance! BR

You can use SSH ProxyJump to do this. Using your Ubuntu server as a proxy or 'jump host'.

  ssh -J user@proxy user@vm

Well, I've found the solution for the questioned problem:

I've issued the following command on my local machine to ssh the vm:

ssh -i ~/.ssh/id_rsa -o ProxyCommand='ssh -i ~/.ssh/id_rsa -W %h:%p <user>@<jumphost/controller_node>' <user>@<target_instance_in_openstack=10.20.20.100>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM