sshd configurare (DSA autentificare)
Postat de: admin la 11 luni 8th, 2008
FreeBSD sshd este în mod implicit la pornire. # which sshd
/usr/sbin/sshd
/etc/ssh/sshd_config la AllowUsers USERNAME numai că, BURUTOFOSUATAKKU (brute force atacuri) împotriva DSA ar trebui să fie autentificat. Dacă vă uitaţi ai vedea acces jurnal, sau umila ţară biscuiti sau分RIMASEN bots, tu ar trebui să constate că urme de atac.
Rescrieţi din fişierul de configurare
/etc/ssh/sshd_config
Protocol 2
PermitRootLogin no
PubkeyAuthentication yes
PasswordAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
no parola pe ea. După rescrierea
sshd restart. # /etc/rc.d/sshd restart
# ps aux | grep sshd
# kill -HUP PID
Cheie privată id_dsa şi cu chei publice id_dsa.pub pentru a genera
Logare cu ssh pentru a permite utilizatorilor să acceseze. root altele) Introduceţi următoarele comenzi.
$ ssh-keygen -d
Generating public/private dsa key pair.
Enter file in which to save the key (/home/ USERNAME /.ssh/id_dsa): [Enter]
Created directory '/home/ USERNAME /.ssh'.
Enter passphrase (empty for no passphrase): [PASSWORD] [Enter]
Enter same passphrase again: [Re PASSWORD] [Enter]
Your identification has been saved in /home/ USERNAME /.ssh/id_dsa.
Your public key has been saved in /home/ USERNAME /.ssh/id_dsa.pub.
The key fingerprint is:
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx USERNAME @ HOST . DOMAIN . NAME
Cheie publică id_dsa.pub pentru a redenumi
$ cd /home/ USERNAME /.ssh
$ mv id_dsa.pub authorized_keys
$ chmod 0600 authorized_keys
Cheie privată id_dsa pentru a trece la un client de maşini
ssh client pentru a se conecta la /home/ USERNAME /.ssh/id_dsa muta. Dacă vă îngrijorează siguranţa, FTP, etc Nu există nici o dischetă USB este o memorie bună şi nu în procesul de utilizare a mass-media atenţie. id_dsa pentru a salva fişierul, acesta va depinde de client terminal, vă rugăm să vă manualul. Personal Open Source TERA termen este o idee bună.
Filed under General |