Dec
09
2019
ini pada system vmware esxi 6.7 ya gaesss
caranya akses vmware lewat putty ssh sebelumya di vmwar diaktifkan dulu kemudian lewat putty langsung jalankan proses berikut perbaris
- esxcli software acceptance set –level=CommunitySupported
- esxcli network firewall ruleset set -e true -r httpClient
- esxcli network firewall ruleset set -e true -r dns
- esxcli software vib install -d https://vibsdepot.v-front.de -n net55-r8168
setelah di reboot interface sudah terdeteksi deh alhamdulillah
Jun
13
2019
The rsync.service IS installed. You just need to look very hard. š
$ systemctl list-unit-files |grep rsync
rsync.service disabled
Since the service is disabled by default (…) you need to enable it and then start it.
$ sudo systemctl enable rsync.service
Synchronizing state for rsync.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d rsync defaults
Executing /usr/sbin/update-rc.d rsync enable
$ sudo systemctl start rsync.service
And there you go:
$ systemctl |grep rsync
rsync.service loaded active running fast remote file copy program daemon
This survives reboots. So no need to manually start the service after each boot.
sumber https://askubuntu.com/questions/628102/15-04-rsync-connection-refused
Mar
26
2019
Scripnya untuk server client kalo ditempat saya server backupnya
rsync -avz -e ‘ssh -p 1234’ root@xxx.xxx.xxx.75:/home /home/backup/web/
ssh -p 1234 ini digunakan jika port ssh tidak default 22
Permasalahannya bagaimana biar ketika scrip diakses tidak harus login alias auto login
Ok caranya
1. masuk ke server backup nya bukan server utama ya tapi server backup atau server client
2. setelah masuk ketik perintah
root@backup3:~# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:ClBOuddYZArKY0wZZN1LGIFV1Z+O7GJaCKbY2LJsgcA root@backup3
The key’s randomart image is:
+—[RSA 2048]—-+
| .=*BB.o+. |
| =o=+.oo. . |
|. B .o.= . . |
|.E o. + . o |
|o +. S. o |
|.* o o o o . |
|+ = o .. |
|.+ .o . |
|o. .o . |
+—-[SHA256]—–+
root@backup3:~#
3. di cek di .ssh
root@backup3:~# cd ~/.ssh/
root@backup3:~/.ssh# ls
id_rsa id_rsa.pub known_hosts
root@backup3:~/.ssh#
root@backup3:~/.ssh# ls -l
total 12
-rw——- 1 root root 1679 Mar 26 16:34 id_rsa
-rw-r–r– 1 root root 394 Mar 26 16:34 id_rsa.pub
-rw-r–r– 1 root root 222 Nov 6 13:08 known_hosts
root@backup3:~/.ssh#
akan ada 3 file seperti diatas
4. nah sampai sini setingan ssh key untuk server klient sudah selesai.
sekarang memasukkan ssh key dari server client ke server utama sehingga permintaan no password di terima oleh server utama dan langkahnya
5. login ke server utama
masuk ke
root@ubuntubaru:~# cd ~/.ssh/
dari sini kemudian kita memasukkan file ssh key dari server clientĀ id_rsa.pub ke server utama bisa lewat sftp ya sehingga ssh key dari server client sudah masuk ke server utama
root@ubuntubaru:~/.ssh# ls -l
total 12
-rw-r–r– 1 root root 399 Mar 25 20:18 id_rsa.pub
-rw-r–r– 1 root root 222 Mar 10 22:47 known_hosts
root@ubuntubaru:~/.ssh#
Kemudian langkah selanjutnya mengcopy id_rsa.pub keĀ authorized_keys dengan perintah
root@ubuntubaru:~/.ssh# cat id_rsa.pub >> ~/.ssh/authorized_keys
nah sampai sini proses telah selesai bisa dipastikan bahwa isi dariĀ id_rsa.pub dan authorized_keys harus sama
nah jika ingin menambah server client lagi bisa langsung dilakukan proses yang nomer 1 sampai 4
kemudian untuk nomer 5 nya tinggal copy aja isi dariĀ id_rsa.pub keĀ authorized_keys sehingga menjadi 2 barisĀ atau 3 baris sekaligus
seperti ini isi authorized dengan 3 server klient
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4RdU08/eX/lVaLjrgbd3HhXdLFaLM44MZQiq9hHV$
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCuky2Lp6LJ09yII25nNQZnwqYZEBYcsj28RYk3HCT$
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDri1ROED0r2pPOxYuU/2GTdSDeEIeQQ6/9zFPNKYe$
ok terimakasihhhh
Feb
12
2019
You can delete X days older files using find utility in your script.
find /path/to/files* -mtime +90 -exec rm {} \;
This will delete 90 Days old files
kalo folder tinggal tambahi -rf
find /path/to/files* -mtime +90 -exec rm -rf {} \;
ini untuk mendelete file bukan folder