Linux: Difference between revisions

Jump to navigation Jump to search
3 bytes removed ,  3 April 2018
Line 8: Line 8:
|-
|-
| style="width: 50%;" | Create private/public SSH key file using 2048 bit encryption and with a comment. The command creates files under ~/.ssh folder.  
| style="width: 50%;" | Create private/public SSH key file using 2048 bit encryption and with a comment. The command creates files under ~/.ssh folder.  
| style="width: 50%;" | <code>ssh-keygen -b 2048 -C user@host.domain</code>
| style="width: 50%;" class="cli" | ssh-keygen -b 2048 -C user@host.domain
|-
|-
| style="width: 50%;" | Push public SSH key to a server
| style="width: 50%;" | Push public SSH key to a server
| style="width: 50%;" | <code>ssh-copy-id -p 41111 -i ~/.ssh/id_rsa.pub mhan@remote.server.com</code>
| style="width: 50%;" class="cli" | ssh-copy-id -p 41111 -i ~/.ssh/id_rsa.pub mhan@remote.server.com
|-
|-
| style="width: 50%;" | Reset (SELinux) permissions related to SSH. This may be needed if all else fails to correct the issue of system not accepting public keys.
| style="width: 50%;" | Reset (SELinux) permissions related to SSH. This may be needed if all else fails to correct the issue of system not accepting public keys.
| style="width: 50%;" | <code>restorecon -R -v ~/.ssh</code>
| style="width: 50%;" class="cli" | restorecon -R -v ~/.ssh
|}
|}


Navigation menu