User Tools

Site Tools


linux

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux [2026/03/01 19:37] reddylinux [2026/03/01 20:25] (current) reddy
Line 3: Line 3:
 ===== Popular Topics ===== ===== Popular Topics =====
  
 +  * [[bash]]
 +  * [[bind]]
   * [[Docker]]   * [[Docker]]
 +  * [[diff]]
   * [[Git]]   * [[Git]]
   * [[rsync]]   * [[rsync]]
Line 82: Line 85:
 </code> </code>
  
-==== ssh-copy-id: Auth with another key ====+==== ssh-copy-id ====
  
 <code> <code>
 ssh-keygen -f key_file_name ssh-keygen -f key_file_name
 +
 +# To make it non-interactive (we cannot pass the StrictHostKeychecking so we direct the "yes")
 +sshpass -p mypassword ssh-copy-id -i key_file_name.pub myuser@myserver <<< yes
  
 # ssh-copy-id doesn't directly support auth with another key # ssh-copy-id doesn't directly support auth with another key
 # ...but it passes along options to ssh # ...but it passes along options to ssh
 ssh-copy-id -i ~/.ssh/id_rsa.nondefault -o 'IdentityFile ~/vm-key' user@remote ssh-copy-id -i ~/.ssh/id_rsa.nondefault -o 'IdentityFile ~/vm-key' user@remote
- 
-# To make it non-interactive (we cannot pass the StrictHostKeychecking so we direct the "yes") 
-sshpass -p mypassword ssh-copy-id -i key_file_name.pub myuser@myserver <<< yes 
  
 # This can also be done with ssh-agent # This can also be done with ssh-agent
linux.1772390260.txt.gz · Last modified: by reddy

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki