# creating private and public keys via ssh-keygen command:
ssh-keygen -f ~/.ssh/myKeysFolder
~/.ssh/id_rsa # id_rsa
~/.ssh/id_rsa.pub # id_rsa.pub
# transferrinjg public key to remote server
ssh-copy-id -i .ssh/key-with-pass.pub user@remotehost
# Şifrəli ssh private keylərin şifrələrini sistemdə müvəqqəti yadda saxlamaq üçün
eval $(ssh-agent)
ssh-add .ssh/key-with-pass
ssh -i .ssh/key2 operator1@servera hostname
OpenSSH configuration
Əsas konfiqurasiya faylı:
/etc/ssh/ sshd_config
Konfiqurasiyalar:
# Root istifadəçisi sistemə ssh vasitəsilə girə bilmir
PermitRootLogin no
# Root istifadəçisi sistemə yalnız ssh key vasitəsilə girə bilir
PermitRootLogin without-password
# Heç bir istifadəçi sistemə ssh şifrəsi vasitəsilə girə bilmir
PasswordAuthentication no #