Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom (guest) SSH port in Homestead.yaml file #721

Closed
willemo opened this issue Nov 15, 2017 · 3 comments
Closed

Custom (guest) SSH port in Homestead.yaml file #721

willemo opened this issue Nov 15, 2017 · 3 comments

Comments

@willemo
Copy link

willemo commented Nov 15, 2017

Versions

  • Vagrant: 1.9.8
  • Provider: Virtualbox 5.1.26
  • Homestead: 6.5.0

Enhancement proposal

Could you add a way to define a different (guest) SSH port through the Homestead.yaml file, so it won't conflict with other Vagrant/Homestead boxes on my machine?

To change the port to 22022 manually, I've added the following line to my Vagrantfile:

config.vm.network :forwarded_port, guest: 22, host: 22022, auto_correct: false, id: "ssh"

After that my vagrant ssh command will use port 22022 to connect to the box.

@svpernova09
Copy link
Contributor

To override default SSH port for vagrant add default_ssh_port: 64444 to your Homestead.yaml file.

@willemo
Copy link
Author

willemo commented Nov 16, 2017

@svpernova09 thanks! That works perfectly! Is there anywhere this is documented?

@svpernova09
Copy link
Contributor

Not sure if this will make it into the official docs, but if you're using master, the functionality will work. Will tag a new release in a few days / possibly this weekend.

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

No branches or pull requests

2 participants