Persiapan SSH untuk SCP Batch

From OnnoWiki
Revision as of 05:36, 26 April 2009 by Onnowpurbo (talk | contribs)
Jump to navigation Jump to search

Agar SSH dapat dilakukan tanpa perlu memasukan password sehingga dapat memudahkan proses scp secara batch kita perlu melakukan hal berikut.


Mesin Server

Install SSH Server

# apt-get install openssh-server


Restart SSH Server

# /etc/init.d/ssh restart


Mesin Client

$ ssh-keygen -t dsa
	<ENTER>
	<ENTER>
	<ENTER>
	/home/user/.ssh/id_dsa.pub


$ chmod 600 /home/user/.ssh/id_dsa.pub

Copykan ke mesin server, masukan ke folder .ssh file authorized_keys

$ scp /home/user/.ssh/id_dsa.pub 'user@machine:~/.ssh/authorized_keys'

Jika nomor Port SSH yang digunakan tidak standard, dapat menggunakan perintah

$ scp -P port /home/user/.ssh/id_dsa.pub 'user@machine:~/.ssh/authorized_keys'



Pranala Menarik