Skip to content

bismillah ..

jadi secara default ssh server hanya mengijinkan login dengan publik key , untuk update agar menjadi allow dengan passwd sbenr nya cukup dengan edit file ssd_config

# Authentication:

#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

#PubkeyAuthentication yes

# Expect .ssh/authorized_keys2 to be disregarded by default in future.
#AuthorizedKeysFile     .ssh/authorized_keys .ssh/authorized_keys2

#AuthorizedPrincipalsFile none

#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
#PermitEmptyPasswords no

rubah PermitRootLogin menjadi yes dan PasswordAuthentication yes

namun ada yang sedikit beda untuk vm yang di buat dari image cloud init secara default dia akan ada tambahan fileconfig yaitu di

/etc/ssh/sshd_config.d/60-cloudimg-settings.conf 

nah config di file itu akan overwrite di file sshd_config , maka walaupun kita sudah set PasswordAuthentication yes di sshd_config dia tidak akan berfungsi dan akan tetap meminta public_key , untuk itu butuh kita set di file /etc/ssh/sshd_config.d/60-cloudimg-settings.conf PasswordAuthentication yes.

root@AdGuard-100:~# cat /etc/ssh/sshd_config.d/60-cloudimg-settings.conf 
PasswordAuthentication yes
root@AdGuard-100:~# 

secara defaul dia PasswordAuthentication no .

semoga bermanfaat 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

Allow login ssh dengan password di VM Cloud Init