Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Configure ssh port? #1039

Closed
pwFoo opened this issue Jun 21, 2016 · 9 comments
Closed

Configure ssh port? #1039

pwFoo opened this issue Jun 21, 2016 · 9 comments

Comments

@pwFoo
Copy link

pwFoo commented Jun 21, 2016

Is there an easy way to change the sshd listen port / bind ip?

Would be nice to have port 22 available for applications :)

@joshwget joshwget added this to the v1.0 Milestone milestone Sep 1, 2016
@cmavr8
Copy link

cmavr8 commented Oct 7, 2016

It should be possible since November 2015: https://forums.rancher.com/t/change-the-default-sshd-port/859

@pwFoo
Copy link
Author

pwFoo commented Oct 7, 2016

That looks like a workaround. A clean solution is prefered (in the future).

@ghost
Copy link

ghost commented Mar 31, 2017

Id wanted to ask if and where the clean solution is available. Thank you

@pwFoo
Copy link
Author

pwFoo commented Sep 8, 2017

Any update here?
Custom sshd port and / or listen ip (internal management interface / ip address) would be nice.

@SvenDowideit SvenDowideit modified the milestones: v1.2.0, unscheduled Sep 12, 2017
@JasonGiedymin
Copy link

Knowing that upon first boot, login is auto until cloud-config is installed, I don't see anything wrong with specifying write_files: for sshd_config. To me the semantics of keeping all the configs in cloud-config is totally acceptable and this message remains consistent.

If you want to change something on the os, start with cloud-config. Currently I have my own settings for network interfaces and sshd sitting in a cloud-config.

Baring implementation opinions, this ticket could be closed because you in fact can change the port with write_files.

@ulm0
Copy link
Contributor

ulm0 commented Dec 9, 2017

write_files is a clean solution, but I can't pass the cloud-config file when creating instances with docker-machine on GCP.

@JasonGiedymin
Copy link

JasonGiedymin commented Dec 9, 2017 via email

@niusmallnan niusmallnan self-assigned this Feb 13, 2018
@niusmallnan
Copy link
Contributor

niusmallnan commented Mar 5, 2018

I will support these configurations:

rancher:
  ssh:
    port: 10022
    listen_address: 172.22.100.100

Users can use these in the cloud-config file.

The rancher.ssh.port is only designed for default console, because if users change sshd-config, restart the host will restore the default. The new configuration will not take effect.

For other consoles,
all files are persistent, users can modify sshd-config by themselves.

@kingsd041
Copy link
Contributor

Tested with rancheros-v1.3.0-rc1.
In v1.13.0-rc1, configuring ssh port and listenaddress in cloud-config is already supported

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants