I am trying to use the fog gem to bootstrap a EC2 host that is listening for ssh connections on a different port than 22. Is there a way to force fog to use a different port than 22? I looked in the docs and did not see a way. I can change net-ssh-2.6.8/lib/net/ssh/transport/session.rb to use the port instead of the default 22, but I didnt want to go that route if possible. Is there a port param for fog that I am not seeing? If someone has an answer and example that would be great.
Asked
Active
Viewed 41 times
2 Answers
2
If you have a server
object you should be able to do server.ssh_port = other_port
and subsequent commands should do-the-right-thing.

geemus
- 2,522
- 16
- 22
0
Yes that fixed the issue thanks for the reply. If possible could you put that in the fog docs? I cant one up your answer because I dont have enough rep points, but thanks again for the answer it was much appreciated.

cdub50
- 23
- 3
-
Actually, would you be interested in making a pull request to improve the docs? I'm certainly happy to help you with any questions you might have, but would hate to take away a great opportunity to get involved if you would like to. Thanks! – geemus Jun 28 '14 at 21:27