Skip to content

Commit

Permalink
refactor: dynamic format fallback auth
Browse files Browse the repository at this point in the history
  • Loading branch information
pythoninja committed Oct 11, 2023
1 parent 90636a6 commit 763b357
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sshgen/generators/sshconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,6 @@ def _create_output_file(self) -> None:
self.output_file.touch(exist_ok=True)

def _get_fallback_auth(self) -> list[str]:
return ['IdentityFile ~/.ssh/ssh_key', ' IdentitiesOnly yes']
parameter = 'IdentitiesOnly yes'
width = len(parameter) + 4
return ['IdentityFile ~/.ssh/ssh_key', f'{parameter: >{width}}']

0 comments on commit 763b357

Please sign in to comment.