Friday, March 23, 2012

Menjalankan perintah di SSH tanpa harus login ke remote PC

sudah lama pengen mengarsipkan tutorial ini :D apa itu SSH??? liat disini http://en.wikipedia.org/wiki/Secure_Shell

ok, mari kita mulai langkah-langkahnya:
  1. membuat public-key di Local PC
userlocal@crunchbang:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/userlocal/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/userlocal/.ssh/id_rsa.
Your public key has been saved in /home/userlocal/.ssh/id_rsa.pub.
The key fingerprint is:
cf:8a:95:56:09:1c:9b:94:83:c6:e9:c9:e9:52:d4:b4 userlocal@crunchbang
The key's randomart image is:
+--[ RSA 2048]----+
|     . =+.       |
|      *o+=       |
|     = oE.       |
|      *  . .     |
|     o  S o      |
|    . .  =       |
|     .  + o      |
|       + .       |
|      . .        |
+-----------------+

tidak ada yang perlu diisi, cukup enter saja sampe muncul randomart image seperti diatas :D
  1. copy public-key ke Remote PC
userlocal@crunchbang:~$ scp .ssh/id_rsa.pub userlocal@serverku.net:.ssh/authorized_keys
userlocal@serverku.net's password:
id_rsa.pub                                   100%  404     0.4KB/s   00:01 

perintah apa lagi itu scp boss??? coba buka disini http://en.wikipedia.org/wiki/Secure_copy

  1. test menjalankan perintah SSH
userlocal@crunchbang:~$ ssh serverku.net ls
bin
downloads
etc
include
lib
libdata
libexec
man
sbin
share

link sumber:
http://www.batan.go.id/igos-batan/tutorial/ssh.html
http://www.batan.go.id/sjk/tutorial/ssh.html

No comments:

Post a Comment