Prosíme přihlašte se nebo zaregistrujte.

Přihlašte se svým uživatelským jménem a heslem.
Vaše pomoc je stále potřeba!

Autor Téma: ssh v 14.04 nejde zakázat požadavek na heslo  (Přečteno 2096 krát)

matlala

  • Aktivní člen
  • *
  • Příspěvků: 480
ssh v 14.04 nejde zakázat požadavek na heslo
« kdy: 21 Června 2014, 10:21:01 »
Zdravím,
mám podle mě i známých bizazdní problém po přeinstalaci mého víceúčelohého servříku z 12.04 na 14.04. Po tom co jsem ověřil že  připojením datového oddílu v RAID 1 jako /home ssh nejde ssh s klíči, ale jen hesly, jsem to udělal stejně po staru a připojil ho to /media/Data1, jenže nastavil jsem /etc/sshd_config stejně - zakázat hesla a vyžadovat jen klíče. Jenže ejhle ono to ten požadavek na heslo z neznámého zařízení má, ale heslo naštěstí nefunguje. Servřík je přes ssh přístupný zvenčí, tak bych nerad aby to vůbec chtělo heslo a na 12.04 to fungovalo právě tak.
Pokud se někdo chce přihlásit na roota, tak to funguje normálně a odmítne ho s chybou že nemá klíč.

moje konfigy:
Kód: [Vybrat]
matlala@NAS-HTPC ~ $ cat /etc/ssh/sshd_config
# Package generated configuration file
# See the sshd_config(5) manpage for details

# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 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
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 1024

# Logging
SyslogFacility AUTH
LogLevel INFO

# Authentication:
LoginGraceTime 120
#PermitRootLogin without-password
PermitRootLogin no
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys

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

# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no

# Change to no to disable tunnelled clear text passwords
PasswordAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no

#MaxStartups 10:30:60
#Banner /etc/issue.net

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM no

Kód: [Vybrat]
matlala@NAS-HTPC ~ $ cat /etc/ssh/ssh_config

# This is the ssh client system-wide configuration file.  See
# ssh_config(5) for more information.  This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.

# Configuration data is parsed as follows:
#  1. command line options
#  2. user-specific file
#  3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.

# Site-wide defaults for some commonly used options.  For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.

Host *
#   ForwardAgent no
#   ForwardX11 no
#   ForwardX11Trusted yes
#   RhostsRSAAuthentication no
#   RSAAuthentication yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   GSSAPIKeyExchange no
#   GSSAPITrustDNS no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/identity
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   Port 22
#   Protocol 2,1
#   Cipher 3des
#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
#   VisualHostKey no
#   ProxyCommand ssh -q -W %h:%p gateway.example.com
#   RekeyLimit 1G 1h
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes
    GSSAPIDelegateCredentials no

Zajímavé je, že jsme vzal meld a porovnal zálohu starého konfigu s aktuální novou a podle rozdílů nastavil.
Takže víte někdo proč se to ptá na hesla když nemá? Následující volby jsem nastavil jak mají být:
Kód: [Vybrat]
ChallengeResponseAuthentication no
PasswordAuthentication no
PubkeyAuthentication yes
UsePAM no
NOTEBOOK: Ubuntu 14.04 (kernel 3.14); Asus N56VM-S4272V (i7 3610QM, 16GB RAM 1600MHz, INTEL SSD 520 180GB + původní HDD místo DVD/BD, Full HD displej) + INTEL 7620 + doma 24" LG IPS 24EA53
NAS-HTPC: Ubuntu server 12.04 x64 + XBMC; ASRock E350M1/USB3, SEASONIC SSP-350GT, RAM 8GB (2x4GB) DDR3 1333MHz, case BITFENIX Prodigy , prim. eth. INTEL PRO/1000 CT, 2ks WD Red 3TB v SW RAID 1, 2*1Gb switch

jmp

  • Host
Re:ssh v 14.04 nejde zakázat požadavek na heslo
« Odpověď #1 kdy: 21 Června 2014, 10:31:26 »
co je v logu?

jsou tam ty klíče?
 pokud ano, jaká jsou tam práva?

matlala

  • Aktivní člen
  • *
  • Příspěvků: 480
Re:ssh v 14.04 nejde zakázat požadavek na heslo
« Odpověď #2 kdy: 09 Ledna 2015, 01:34:18 »
Jejda ono někdo reaguje na staré téma.  Mrknu se,  musim to otestovat zvenčí.
NOTEBOOK: Ubuntu 14.04 (kernel 3.14); Asus N56VM-S4272V (i7 3610QM, 16GB RAM 1600MHz, INTEL SSD 520 180GB + původní HDD místo DVD/BD, Full HD displej) + INTEL 7620 + doma 24" LG IPS 24EA53
NAS-HTPC: Ubuntu server 12.04 x64 + XBMC; ASRock E350M1/USB3, SEASONIC SSP-350GT, RAM 8GB (2x4GB) DDR3 1333MHz, case BITFENIX Prodigy , prim. eth. INTEL PRO/1000 CT, 2ks WD Red 3TB v SW RAID 1, 2*1Gb switch

 

Provoz zaštiťuje spolek OpenAlt.