How to change hosts ssh port? [Custom SSH Port]

Hey there,

me and my team are new to OpenNebula and are pretty happy about the system itself already.

One thing that bothers us though is the fact that there is no config option or way, noted anywhere on how to change the ssh port for a host (within one) from the standard port 22 to the port that you have set in your /etc/ssh/sshd_config (e.g. 12345).

Is there any way to tell OpenNebula to use another port for connecting to a host?

Best regards,

Bent

Hi,
have you tried to set it in ${oneadmin_home}/.ssh/config ?

Sounds interesting, unfortunately the hosts, which OpenNebula connects to are not listed in there:

Contents of the file are:

Host *
StrictHostKeyChecking no
UserKnownHostsFile /dev/null

But thanks for the reply!

~ Bent

That is the recommended way. You can use any pattern to select opennebula
hypervisors, if * fits try using

Host *
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
Port <the_port_number_to_connect_to>

check ssh_config(5) , for example we also find useful ControlPath to reuse
connections

1 Like

Seems to work!

Here you deserve a cookie:

~ Bent