chef / knife-cloud

Library for Chef knife cloud plugins
Apache License 2.0
18 stars 20 forks source link

Fixes SSH gateway remote SSH port option handling #135

Closed mikemar10 closed 4 years ago

mikemar10 commented 4 years ago

Description

I recently discovered that knife-cloud was incorrectly handling options for specifying the remote SSH port of the node you want to bootstrap when using an SSH gateway. The problem was that it was only honoring the deprecated --ssh-port option and not the replacement option --connection-port. It also lacked a default of port 22, so when --ssh-port was unspecified, nil was being passed as the remote port for the SSH gateway. From my cursory reading of RFC 4254 not passing a remote port is unspecified behavior so I've added a default for the remote port.

Related Issue

https://github.com/chef/knife-cloud/issues/134

Types of changes

Checklist:

Can you please clarify the difference between the pre-merge tests and all new and existing tests? I have passing tests per rake spec && rake style. I didn't see any relevant documentation to update, but if I've missed something please let me know and I'll address it.

tas50 commented 4 years ago

Thanks for getting tests added to this as well @mikemar10