Enable SSHD di Opensuse11

Iseng-iseng oprek-oprek lagi Linux dan Opensuse jadi pilihan gw untuk diinstall di atas VMWare. Ketika mau mencoba  melakukan remote via ssh, ternyata tidak bisa dilakukan karena “connection refused”. Untuk itu saya melakukan instalasi (eh udah diinstall ternyata).

linux-r8vr:/etc/ssh # ssh root@192.168.89.130

ssh: connect to host 192.168.89.130 port 22: Connection refused

Hmm, ternyata si SSH tidak merespon.

linux-r8vr:/etc/ssh #netstat –an |grep :22

tidak muncul apa-apa!

By default, sshd_config di opensuse tidak diset supaya membuka port 22 sebagai port standard untuk SSH. Untuk itu buka dan edit sshd_config

linux-r8vr:/etc/ssh #gedit sshd_config

lalu cari yang bertuliskan “Port 22”

————–

# The strategy used for options in the default sshd_config shipped with

# OpenSSH is to specify options with their default value where

# possible, but leave them commented.  Uncommented options change a

# default value.

#Port 22

#AddressFamily any

#ListenAddress 0.0.0.0

#ListenAddress ::

——-

Terlihat di konfigurasi ssh #Port 22, lalu hilangkan tanda “#” supaya port 22 dibuka.Sehingga menjadi:

# The strategy used for options in the default sshd_config shipped with

# OpenSSH is to specify options with their default value where

# possible, but leave them commented.  Uncommented options change a

# default value.

Port 22

#AddressFamily any

#ListenAddress 0.0.0.0

#ListenAddress ::

Jika mau menambahkan port lain, tambahkan komen di bawahnya misalnya

Port 22

Port 9422

Lalu hidupkan service sshd

linux-r8vr:/etc/ssh # service sshd start

Generating /etc/ssh/ssh_host_key.

Generating public/private rsa1 key pair.

Your identification has been saved in /etc/ssh/ssh_host_key.

Your public key has been saved in /etc/ssh/ssh_host_key.pub.

The key fingerprint is:

bd:30:35:9e:68:af:04:47:7f:0e:1f:c1:04:5e:74:91 root@linux-r8vr

The key’s randomart image is:

+–[RSA1 1024]—-+

|          .o+ oo |

|         . + .E  |

|        . + o    |

|       . * o .   |

|      . S * o    |

|       + + * .   |

|        . o o    |

|       . .       |

|        .        |

+—————–+

Generating /etc/ssh/ssh_host_dsa_key.

Generating public/private dsa key pair.

Your identification has been saved in /etc/ssh/ssh_host_dsa_key.

Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub.

The key fingerprint is:

db:4a:60:82:9e:34:3f:f2:0b:44:4c:3e:5b:5d:b7:84 root@linux-r8vr

The key’s randomart image is:

+–[ DSA 1024]—-+

|  .     ..o      |

| +   . .Eo .     |

|  = . .   .      |

| . =             |

|  * . o S        |

| + + o . o       |

|  = o   o .      |

|   + . . .       |

|    o.  .        |

+—————–+

Generating /etc/ssh/ssh_host_rsa_key.

Generating public/private rsa key pair.

Your identification has been saved in /etc/ssh/ssh_host_rsa_key.

Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.

The key fingerprint is:

65:c0:f3:a8:d1:ff:e0:4b:f6:d0:98:82:58:c9:fa:f3 root@linux-r8vr

The key’s randomart image is:

+–[ RSA 1024]—-+

|       ..        |

|        o.       |

|       . +o      |

|     …oo.      |

|      +oS.       |

|     +..  o+     |

|    o . ..*o.    |

|     ..  +.o.    |

|      .oE …    |

+—————–+

Starting SSH daemon                                                  done

lalu cek sshd tersebut

linux-r8vr:/etc/ssh # netstat -an | grep :22

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN

tcp        0      0 192.168.89.130:37451    192.168.89.130:22       TIME_WAIT

tcp        0      0 :::22                   :::*                    LISTEN

linux-r8vr:/etc/ssh #

lalu test koneksi ke sshd server kita misalnya IP server kita adalah 192.168.89.130

linux-r8vr:/etc/ssh #ssh root@192.168.89.130

lalu akan terlihat seperti berikut:

linux-r8vr:/etc/ssh # ssh root@192.168.89.130

Password:

Last login: Mon Jul 16 20:00:02 2012 from 192.168.89.1

Have a lot of fun…

linux-r8vr:~ #

jika kita terbiasa dengan Putty atau SecureCRT makan akan terlihat lebih kurang menarik J

Advertisements