[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ssh raspberry e raspdebian



Il 15/09/2016 17:15, davide polimanti ha scritto:
Mi succede questo da un po¹ di giorni


ssh pi@dominio
The authenticity of host 'www.davlab.net (mioip)' can't be established.
RSA key fingerprint is e7:37:21:0d:9c:12:38:f4:b6:86:9a:83:c8:fe:c8:1a.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added Œdominio,mioip' (RSA) to the list of known
hosts.
pi@dominio's password:
Permission denied, please try again.
pi@domino's password:

La password e¹ giusta tanto che se mi collego on ip locale va

Devo  modificare qualcosa nella configurazione ssh?

davide
Inizialmente ho creato uno nuovoutente che fa parte del gruppo sudo,
adduser nome1 sudo
# cat /etc/sudoers | grep -v -E "^$|^#|^;"
...
nome1 ALL=(ALL) NOPASSWD: /sbin/shutdown
...
ho disabilitato l'utente pi

ho messo in hosts.allow gli indirizzi dai quali accedere
# cat /etc/hosts.allow | grep -v -E "^$|^#|^;"
sshd: indirizzo_ip_remoto indirizzi_ip_locali


# cat /etc/ssh/sshd_config | grep -v -E "^$|^#|^;"
Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
UsePrivilegeSeparation yes
KeyRegenerationInterval 3600
ServerKeyBits 1024
SyslogFacility AUTH
LogLevel INFO
LoginGraceTime 120
PermitRootLogin no
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile      %h/.ssh/authorized_keys
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
# PasswordAuthentication yes se non usi la chiave
PasswordAuthentication no
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
# UseLogin yes se non usi la chiave
UseLogin no
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yes
# da mettere se non usi la chiave
AllowUsers  nome1 nome2 nome..

nel file ssh_config non ho fatto cambiamenti
# cat /etc/ssh/ssh_config | grep -v -E "^$|^#|^;"
Host *
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes
    GSSAPIDelegateCredentials no


se usi iptables mettere gli indirizzi di accesso:
# cat /etc/iptables/rules.v4 | grep -v -E "^$|^#|^;"
*filter
...
-A INPUT -s un_indirizzo_ip_rete_locale/32 -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT -A INPUT -s indirizzo_ip_remoto/32 -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
...


ho creato una chave di accesso
$ ssh-keygen
puoi farlo con la password o senza

al momento sta funzionando tutto, quasi ogni mese lo devo riavviare perche' si addormenta,
forse a volte scalda un po'.

ciao
Beppe

--
le nuvole non hanno regole,
perchè non hanno mai rinunciato
alla libertà di sognare.


Reply to: