Sharing Host SSH Keys with Embedded Platforms: Difference between revisions

Line 42: Line 42:
SSH agent forwarding can be used to securely use your host's SSH keys on an embedded platform without physically copying the keys to the platform. This is particularly useful for operations that require SSH access, such as git operations with repositories on GitHub or GitLab.
SSH agent forwarding can be used to securely use your host's SSH keys on an embedded platform without physically copying the keys to the platform. This is particularly useful for operations that require SSH access, such as git operations with repositories on GitHub or GitLab.


{{Ambox
{{Colored box|background-title-color=#6586B9|title-color=#FFFFFF|title='''Note'''|icon=notice-icon-white.png
| type        = notice
  |style=overflow:hidden;
| text        = '''DONT WORRY!'''
  |content='''DONT WORRY!'''


Your host keys are only valid in the current SSH session and are not stored anywhere.
Your host keys are only valid in the current SSH session and are not stored anywhere.
}}
}}


=== Steps to Forward SSH Keys ===
=== Steps to Forward SSH Keys ===
Line 59: Line 60:
This flag tells SSH to forward the SSH agent connection.
This flag tells SSH to forward the SSH agent connection.


{{Ambox
{{Colored box|background-title-color=#6586B9|title-color=#FFFFFF|title='''Note'''|icon=notice-icon-white.png
| type        = notice
  |style=overflow:hidden;
| text        = '''TIP!'''  
  |title='''Note'''
  |content='''TIP!'''  


If you use an SSH configuration file for storing common hosts such as ''~/.ssh/config'', you can add the option "'''ForwardAgent yes'''" to enable the Agent Forwarding without modifying your <code>ssh <host></code> command. For example:  
If you use an SSH configuration file for storing common hosts such as ''~/.ssh/config'', you can add the option "'''ForwardAgent yes'''" to enable the Agent Forwarding without modifying your <code>ssh <host></code> command. For example:  
Line 77: Line 79:
ssh nx
ssh nx
</syntaxhighlight>
</syntaxhighlight>
}}
}}