linux_wiki:configure_key-based_authentication_for_ssh

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux_wiki:configure_key-based_authentication_for_ssh [2016/02/29 22:15]
billdozor created
linux_wiki:configure_key-based_authentication_for_ssh [2019/05/25 23:50] (current)
Line 1: Line 1:
-====== Configure Key-based Authentication For Ssh ======+====== Configure Key-based Authentication For SSH ======
  
 **General Information** **General Information**
  
-About this page/how-to/script+SSH public/private key authentication for password-less logins
  
 ---- ----
  
-Start from source system.+===== On Server1 =====
  
-\\ +Generate public/private key pair (press 'enter' when prompted to enter a passphrase to keep empty)
-Generate public/private key pair+
 <code bash> <code bash>
 ssh-keygen ssh-keygen
Line 19: Line 18:
  
 \\ \\
-Copy from source to destination server +Copy from server1 to destination server2
-<code bash> +
-ssh-copy-id user@10.0.0.5 +
-</code> +
- +
-\\ +
-Add private key passphrase to ssh-agent +
- +
-1) Check to see if ssh-agent is running +
-<code bash> +
-eval $(ssh-agent) +
-Agent pid 6599 +
-</code> +
-  * Example of it running +
- +
-2a) If not running, start it +
-<code bash> +
-ssh-agent bash +
-</code> +
- +
-2b) If running, or after starting it, execute the following+
 <code bash> <code bash>
-ssh-add+ssh-copy-id user@192.168.1.151
 </code> </code>
-  * This allows for remote connecting without entering in any private key passphrase (if entered when key was generated) 
-  * **This step can be skipped** if no pass-phrase was entered while generating the key. 
  
 \\ \\
-Execute Command on remote system+Execute Command on remote system (or simply ssh login normally)
 <code bash> <code bash>
-ssh user@10.0.0.1 "ls -la"+ssh user@192.168.1.151 "ls -la"
 </code> </code>
  
 ---- ----
  
  • linux_wiki/configure_key-based_authentication_for_ssh.1456802106.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)