Friday, December 13, 2013

Instalasi SSH di Ubuntu

Untuk memudahkan setup, konfigurasi, setting atau apapun si server dari jarak jauh, perlu dipasang SSH di sisi server Ubuntu 10.04.1 LTS. Maklum server ada di Data Center Kuningan Jakarta dan kantor ada di Serpong. Atau, kadang kala pengen juga mengakses server dari rumah atau tempat-tempat lain melalui modem. Gak ada lain selain harus ada SSH. Sebenernya server ini sudah cukup lama terpasang, namun ketika saya coba SSH tidak ada respon. Di lihat juga tidak ada daemon SSH yang aktif. Mau gak mau harus instalasi SSH server.


Instalasi OpenSSH

Sekarang ini instalasi paket menjadi mudah. Syaratnya ada koneksi Internet. Untuk instalasi SSH, saya coba ssh dan openssh. Ternyata paket yang tersedia di repositori Ubuntu adalah openssh. Untuk instalasi OpenSSH, gunakan perintah baris :

# apt-get install openssh-server

ketik Y kemudian tekan enter untuk mengkonfirmasi penginstalan paket OpenSSH server. Service OpenSSH (sshd) akan otomatis berjalan (running) setelah proses instalasi.

Pengujian OpenSSH

Setelah instalasi selesai, coba lakukan pengecekan dengan melakukan ssh dari client. Karena saya pakai MacBook Air dan sudah dilengkapi ssh, maka saya tinggal menjalankan :

Muhammad-Sirojul-Munirs-MacBook-Air:~ muhammadsirojulmunir$ ssh msmunir@183.91.xx.y
msmunir@183.91.xx.y's password: 
Linux komputasi 2.6.32-25-generic-pae #45-Ubuntu SMP Sat Oct 16 21:01:33 UTC 2010 i686 GNU/Linux
Ubuntu 10.04.1 LTS

Welcome to Ubuntu!
 * Documentation:  https://help.ubuntu.com/

  System information as of Sat Dec 14 05:43:57 WIT 2013

  System load:    0.05               Processes:           103
  Usage of /home: 9.8% of 101.81GB   Users logged in:     0
  Memory usage:   26%                IP address for eth1: 192.168.17.10
  Swap usage:     0%                 IP address for eth0: 183.91.xx.y

  Graph this data and manage this system at https://landscape.canonical.com/

New release 'precise' available.
Run 'do-release-upgrade' to upgrade to it.

Last login: Fri Dec 13 19:00:33 2013 from 180.252.141.135

Sebelum koneksi SSH menggunakan nama sendiri, sebaiknya buat akun dulu di server, bisa dilakukan melalui Console atau melalui SSH juga.

Melihat Status dengan CHKCONFIG


root@komputasi:~# chkconfig
The program 'chkconfig' is currently not installed.  You can install it by typing:
apt-get install chkconfig
root@komputasi:~# apt-get install chkconfig
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-2.6.32-21 linux-headers-2.6.32-21-generic-pae
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  chkconfig
0 upgraded, 1 newly installed, 0 to remove and 230 not upgraded.
Need to get 9,222B of archives.
After this operation, 69.6kB of additional disk space will be used.
Get:1 http://kambing.ui.ac.id/ubuntu/ lucid/universe chkconfig 11.0-79.1-2 [9,222B]
Fetched 9,222B in 0s (203kB/s)     
Selecting previously deselected package chkconfig.
(Reading database ... 82012 files and directories currently installed.)
Unpacking chkconfig (from .../chkconfig_11.0-79.1-2_all.deb) ...
Processing triggers for man-db ...
Setting up chkconfig (11.0-79.1-2) ...
root@komputasi:~# chkconfig
apache2                     on
apparmor                    on
apport                      off
atd                         off
bootlogd                    off
console-setup               off
cron                        off
dbus                        off
dmesg                       off
dns-clean                   on
exim4                       on
failsafe-x                  off
fancontrol                  on
ganglia-monitor             on
gmetad                      on
grub-common                 on
hostname                    off
hwclock                     off
hwclock-save                off
irqbalance                  off
killprocs                   on
lm-sensors                  on
module-init-tools           off
mysql                       off
network-interface           off
network-interface-security  off
networking                  0
ondemand                    on
plymouth                    off
plymouth-log                off
plymouth-splash             off
plymouth-stop               off
pppd-dns                    on
procps                      off
rc.local                    on
rcS                         off
rsync                       on
rsyslog                     off
screen-cleanup              off
sendsigs                    0
snmpd                       on
ssh                         off
stop-bootlogd               off
stop-bootlogd-single        off
udev                        off
udev-finish                 off
udevmonitor                 off
udevtrigger                 off
ufw                         off
umountfs                    0
umountnfs.sh                0
umountroot                  0
urandom                     0S
vsftpd                      off
wpa-ifupdown                0
x11-common                  on

Kenapa openssh gak ada dalam service di atas yaa?

Ada 2 masalah lain yang dihadapi :
  1. Ganti atau reset password Root dari console di Ubuntu 10.04.1 LTS
  2. Ping dari Windows 7 kenapa tidak bisa?
Utiliti :
1. Cek hard disk : df -h
2. Cek RAM : free
3. root@komputasi:~# dmidecode --type memory
4. Untuk Melihat Informasi CPU : cat /proc/cpuinfo
5. Untuk Melihat Info Mengenai Memori : cat /proc/meminfo
6. Untuk Melihat Informasi Hardisk: cat /proc/partitions

msmunir@komputasi:~$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              33G  4.8G   26G  16% /
none                 1002M  220K 1002M   1% /dev
none                 1006M     0 1006M   0% /dev/shm
none                 1006M   64K 1006M   1% /var/run
none                 1006M     0 1006M   0% /var/lock
none                 1006M     0 1006M   0% /lib/init/rw
/dev/sdb1             230G  141G   78G  65% /var
/dev/sda6             102G   10G   87G  11% /home
/dev/sda7              92G   35G   53G  40% /media/backup

msmunir@komputasi:~$ free
             total       used       free     shared    buffers     cached
Mem:       2059692     730692    1329000          0     101008     434184
-/+ buffers/cache:     195500    1864192
Swap:      3903752          0    3903752

root@komputasi:~# dmidecode --type memory
# dmidecode 2.9
SMBIOS 2.5 present.

Handle 0x0021, DMI type 16, 15 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: Multi-bit ECC
Maximum Capacity: 8 GB
Error Information Handle: Not Provided
Number Of Devices: 4

Handle 0x0022, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x0021
Error Information Handle: No Error
Total Width: 42504 bits
Data Width: 42568 bits
Size: 512 MB
Form Factor: DIMM
Set: 1
Locator: DIMM 1
Bank Locator: DIMM 1
Type: DDR2
Type Detail: Synchronous
Speed: 667 MHz (1.5 ns)
Manufacturer: Samsung                                         
Serial Number: 48159F58
Asset Tag: 33470901
Part Number: 4D332039315436353533475A332D43453620

Handle 0x0023, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x0021
Error Information Handle: No Error
Total Width: 41992 bits
Data Width: 42056 bits
Size: 1024 MB
Form Factor: DIMM
Set: 2
Locator: DIMM 2
Bank Locator: DIMM 2
Type: DDR2
Type Detail: Synchronous
Speed: 667 MHz (1.5 ns)
Manufacturer: Unknown                                         
Serial Number: ED4F0100
Asset Tag: 00000811
Part Number: 000000000000000000000000000000000000

Handle 0x0024, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x0021
Error Information Handle: No Error
Total Width: 41480 bits
Data Width: 41544 bits
Size: 512 MB
Form Factor: DIMM
Set: 1
Locator: DIMM 3
Bank Locator: DIMM 3
Type: DDR2
Type Detail: Synchronous
Speed: 667 MHz (1.5 ns)
Manufacturer: Samsung                                         
Serial Number: 48159F5A
Asset Tag: 33470901
Part Number: 4D332039315436353533475A332D43453620

Handle 0x0025, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x0021
Error Information Handle: No Error
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: DIMM
Set: 2
Locator: DIMM 4
Bank Locator: DIMM 4
Type: DDR2
Type Detail: Synchronous
Speed: Unknown
Manufacturer:                                                 
Serial Number:         
Asset Tag:         
Part Number:


root@komputasi:~# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Xeon(R) CPU           E3110  @ 3.00GHz
stepping : 10
cpu MHz : 2000.000
cache size : 6144 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority
bogomips : 5999.85
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Xeon(R) CPU           E3110  @ 3.00GHz
stepping : 10
cpu MHz : 2000.000
cache size : 6144 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority
bogomips : 5999.94
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

root@komputasi:~# cat /proc/meminfo
MemTotal:        2059692 kB
MemFree:         1074932 kB
Buffers:          210588 kB
Cached:           505060 kB
SwapCached:            0 kB
Active:           588664 kB
Inactive:         289388 kB
Active(anon):     162472 kB
Inactive(anon):      444 kB
Active(file):     426192 kB
Inactive(file):   288944 kB
Unevictable:           0 kB
Mlocked:               0 kB
HighTotal:       1184136 kB
HighFree:         510508 kB
LowTotal:         875556 kB
LowFree:          564424 kB
SwapTotal:       3903752 kB
SwapFree:        3903752 kB
Dirty:               436 kB
Writeback:             0 kB
AnonPages:        162436 kB
Mapped:            19960 kB
Shmem:               484 kB
Slab:              92088 kB
SReclaimable:      85816 kB
SUnreclaim:         6272 kB
KernelStack:        1520 kB
PageTables:         1828 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     4933596 kB
Committed_AS:     586952 kB
VmallocTotal:     122880 kB
VmallocUsed:        6112 kB
VmallocChunk:     112852 kB
HardwareCorrupted:     0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:        8184 kB
DirectMap2M:      903168 kB

root@komputasi:~# cat /proc/partitions
major minor  #blocks  name

   8        0  244198584 sda
   8        1   34178256 sda1
   8        2          1 sda2
   8        5    3903763 sda5
   8        6  108454783 sda6
   8        7   97657856 sda7
   8       16  244198584 sdb
   8       17  244196001 sdb1

Tapi kenapa gak ditotal aja sda berapa dan sdb berapa yaa? Jadi jika pengen tahu hard disk #1,  dan hard disk #2, dst harus ngitung lagi.

No comments:

Post a Comment