Skip to content

Conversation

@rawiriblundell
Copy link

As per #324 , this PR proposes a tiny change to the handling of the ssh key path within the instance_ssh() function.

The change is literally from this:

-i "${BMA_SSH_DIR:-~/.ssh/}$keyname"

to this

-i "${BMA_SSH_DIR:-~/.ssh}/$keyname"

The rationale is that if BMA_SSH_DIR is missing a trailing slash, this will ensure that one is present. If BMA_SSH_DIR does have a trailing slash, then a non-fatal double-slash will be present (i.e. /path/to/BMA_SSH_DIR//keyname) and the connection will still work. Either way, the default behaviour of ~/.ssh/$keyname remains intact.

With the current code, a BMA_SSH_DIR without a trailing slash results in e.g. /path/to/BMA_SSH_DIRkeyname which will obviously fail.

@rawiriblundell rawiriblundell requested a review from mbailey as a code owner July 28, 2022 23:05
@mbailey
Copy link
Owner

mbailey commented Jul 29, 2022

Thanks Rawiri!

@mbailey mbailey merged commit 2c38b6c into mbailey:master Jul 29, 2022
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

Successfully merging this pull request may close these issues.

2 participants