Difference between revisions of "Internet Offline: automatic ssh remote login"

From OnnoWiki
Jump to navigation Jump to search
(Created page with "Buat id_dsa.pub chmod 700 ~/.ssh ssh-keygen -t dsa Copy ke remote server ssh pi@192.168.0.1 'mkdir .ssh' ssh pi@192.168.0.1 'touch ~/.ssh/authorized_keys' cat ~/.ssh/i...")
 
Line 3: Line 3:
 
  chmod 700 ~/.ssh
 
  chmod 700 ~/.ssh
 
  ssh-keygen -t dsa
 
  ssh-keygen -t dsa
 +
ssh-copy-id user@machine
 +
ssh-copy-id pi@192.168.0.1
  
Copy ke remote server
+
Alternative yang lebih panjang:(
  
 
  ssh pi@192.168.0.1 'mkdir .ssh'
 
  ssh pi@192.168.0.1 'mkdir .ssh'

Revision as of 08:20, 16 December 2018

Buat id_dsa.pub

chmod 700 ~/.ssh
ssh-keygen -t dsa
ssh-copy-id user@machine
ssh-copy-id pi@192.168.0.1

Alternative yang lebih panjang:(

ssh pi@192.168.0.1 'mkdir .ssh'
ssh pi@192.168.0.1 'touch ~/.ssh/authorized_keys'
cat ~/.ssh/id_dsa.pub | ssh pi@192.168.0.1 'cat >> ~/.ssh/authorized_keys'


Pranala Menarik