En pääse kirjautuman tavallisella tunnuksella, mutta root tunnuksella kirjautuminen toimii:
/var/log/messagesissa tuollanen virheilmoitus, kun yritän kirjautua tavallisella tunnuksella.
sshd[7178]: fatal: mm_receive_fd: UsePrivilegeSeparation=yes not supported
/var/log/messagesissa tuollanen virheilmoitus, kun yritän kirjautua tavallisella tunnuksella.
sshd[7178]: fatal: mm_receive_fd: UsePrivilegeSeparation=yes not supported
Vastaukset 13
Vanhimmat
>...root tunnuksella kirjautuminen toimii:
Se pitäisi kieltää ensitilassa!
"Allowing the root user to login directly is a major security issue"
http://www.crucialp.com/resources/tutorials/secure-server-securing/disable-direct-root-login.php
>>...root tunnuksella kirjautuminen toimii:
>Se pitäisi kieltää ensitilassa!
Ei paljoa vaadi lukea /etc/ssh hakemistojen tiedostoja. Tarvittaessa voi tehdä config-tiedostoihin tarvittavia muutoksia.
Muutokset astuvat voimaa heti, kun käynnistään palvelun uudelleen käyttöön.
>Tarvittaessa voi tehdä config-tiedostoihin tarvittavia muutoksia.
Jos on kirjautunut roottina, ei muuten.
Alkuperäisen kysyjän kannattaa katsoa ettei /etc/ssh/sshd_config:sta löydy asetusta DenyUsers, AllowUsers, DenyGroups, tai AllowGroups joilla loggautumista on rajoitettu tietyihin käyttäjätunnuksiin.
Tuolla komennolla saa listauksen asetuksista.. mulla tulee tällainen, operoin userina ssh:lla lähiverkossa.
root@debian:/home/koti# sshd -T
port 22
protocol 2
addressfamily any
listenaddress [::]:22
listenaddress 0.0.0.0:22
serverkeybits 768
logingracetime 120
keyregenerationinterval 3600
x11displayoffset 10
maxauthtries 6
clientaliveinterval 0
clientalivecountmax 3
permitrootlogin yes
ignorerhosts yes
ignoreuserknownhosts no
rhostsrsaauthentication no
hostbasedauthentication no
hostbasedusesnamefrompacketonly no
rsaauthentication yes
pubkeyauthentication yes
kerberosauthentication no
kerberosorlocalpasswd yes
kerberosticketcleanup yes
UNKNOWN no
gssapiauthentication no
gssapikeyexchange no
gssapicleanupcredentials yes
gssapistrictacceptorcheck yes
passwordauthentication yes
kbdinteractiveauthentication no
challengeresponseauthentication no
printmotd no
printlastlog yes
x11forwarding yes
x11uselocalhost yes
strictmodes yes
tcpkeepalive yes
permitblacklistedkeys no
permitemptypasswords no
permituserenvironment no
uselogin no
compression delayed
gatewayports no
usedns yes
allowtcpforwarding yes
useprivilegeseparation yes
pidfile /var/run/sshd.pid
xauthlocation /usr/bin/X11/xauth
authorizedkeysfile .ssh/authorized_keys
authorizedkeysfile2 .ssh/authorized_keys2
loglevel INFO
syslogfacility AUTH
hostkey /etc/ssh/ssh_host_rsa_key
hostkey /etc/ssh/ssh_host_dsa_key
acceptenv LANG
acceptenv LC_*
subsystem sftp /usr/lib/openssh/sftp-server
maxstartups 10:100:10
permittunnel no
permitopen
root@debian:/home/koti#
>permitrootlogin yes
Tästä on taitettu peistä vähän samaan tyyliin kuin siitä kannattaako winukkaa käyttää administrator-oikeuksilla.
Oikeasti siitä ei ole mitään hyötyä mutta haittana se että logista näkee vain mistä root-login on suoritettu, ei sitä millä käyttäjätunnuksella root-oikeuksia on su:lla käytetty.
Oma kantani on pitkälle tämän kaltainen.
"The option PermitRootLogin specifies whether root can log in using ssh. Never say yes to this option."
http://www.faqs.org/docs/securing/chap15sec122.html
Tuolla ei ole mitään merkitystä Nattaavan rautamuurin takana aliverkon aliverkossa ;D
Ei tietenkään voi suositella muissa verkoissa.
Siinä oli vain yksi vertailulista jos siitä löytyy kovasti jotakin poikkeavaa niin voi tutkia asiaa mutta kyllä, se rootin permit pitäisi olla muissa verkoissa "no". Itse loggaudun aina userina vaikkei asialla edes ole mun omassa ali-aliverkossa mitään merkitystä.. ellei mun 4-vuotias poikani sitten suorita verkkohyökkäystä omalta koneeltaan?
Eiköhän loogisinta olisi ensin saada tavalliset tunnukset toimimaan, ja vasta sen sitten disabloida se ainoa tunnus jolla pystyy kirjautuman sisään? Vai mitä mieltä olet?
eikö?
Onko kerneli tai sshd itse käännetty? Ainakin silloin saattaa tulla hämminkiä.
Kyseessä on Buffalon LinkStation 2 verkkokiintolevystä, ja siinä olevasta Linuxista (merkki tuntematon)
Moi.
Joo eli sulla on ilmeisesti vikana tämä:
Väärin ->: UsePrivilegeSeparation=yes
Oikein ->: UsePrivilegeSeparation yes
Kerrotko jos ei toimi :/
plagioitu http://bugs.gentoo.org/123478
T: ?
Itse asiassa tuo rivi oli kommentoituna, mutta senkin kanssa on sama ongelma edelleen:
# $OpenBSD: sshd_config,v 1.65 2003/08/28 12:54:34 markus Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.
Port 22
Protocol 2,1
#ListenAddress 0.0.0.0
#ListenAddress ::
# HostKey for protocol version 1
#HostKey /etc/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh_host_rsa_key
#HostKey /etc/ssh_host_dsa_key
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768
# Logging
#obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
PermitRootLogin yes
StrictModes yes
#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys
# For this to work you will also need host keys in /etc/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and 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
# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCreds yes
# Set this to 'yes' to enable PAM authentication (via challenge-response)
# and session processing. Depending on your PAM configuration, this may
# bypass the setting of 'PasswordAuthentication'
#UsePAM yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#KeepAlive yes
#UseLogin no
UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression yes
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
# no default banner path
#Banner /some/path
# override default of no subsystems
Subsystem sftp /usr/local/libexec/sftp-server
Moi.
Tämä voi tuntua typerältä muuta ihan varmuuden vuoksi:
Lisää sen tiedoston alkuun jota epäilet tuon sshd palvelun konffi tiedostoksi rivi:
aiiaiaia
sshdn käynnistyksessä tulisi ilmetä virhe, jos ilmenee niin ainakin konffitiedosto on oikea :)
niin ja mulla /etc/ssh/sshd_config näyttää tältä:
# Package generated configuration file
# See the sshd(8) 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
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes
# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768
# Logging
SyslogFacility AUTH
LogLevel INFO
# Authentication:
LoginGraceTime 120
PermitRootLogin yes
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 yes
# 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
UsePAM yes
T: ?