質問: 正しいパスワード認証でssh許可が拒否されました 昨日使っていたのとまったく同じ資格情報を使って昨日自分のマシンにsshで接続できたマシンはcentos 6.3を実行しています。しかし、今はどういうわけかそれは私に許可を与えて拒否されています。これが私の-vプリントアウト、sshd_config、およびssh_configファイルです。$ ssh -vg -l 3333:localhost:6666 misfitred@devilsmilk openssh_6.1p1, openssl 1.0.1c 10 may 2012 debug1: reading configuration data /etc/ssh_config debug1: connecting to devilsmilk [10.0.10.113] port 22. debug1: connection established. debug1: identity file /home/kgraves/.ssh/id_rsa type -1 debug1: identity file /home/kgraves/.ssh/id_rsa-cert type -1 debug1: identity file /home/kgraves/.ssh/id_dsa type -1 debug1: identity file /home/kgraves/.ssh/id_dsa-cert type -1 debug1: identity file /home/kgraves/.ssh/id_ecdsa type -1 debug1: identity file /home/kgraves/.ssh/id_ecdsa-cert type -1 debug1: remote protocol version 2.0, remote software version openssh_6.1 debug1: match: openssh_6.1 pat openssh* debug1: enabling compatibility mode for protocol 2.0 debug1: local version string ssh-2.0-openssh_6.1 debug1: ssh2_msg_kexinit sent debug1: ssh2_msg_kexinit received debug1: kex: server->client aes128-ctr hmac-md5 none debug1: kex: client->server aes128-ctr hmac-md5 none debug1: sending ssh2_msg_kex_ecdh_init debug1: expecting ssh2_msg_kex_ecdh_reply debug1: server host key: ecdsa de:1c:37:d7:84:0b:f8:f9:5e:da:11:49:57:4f:b8:f1 debug1: host 'devilsmilk' is known and matches the ecdsa host key. debug1: found key in /home/kgraves/.ssh/known_hosts:1 debug1: ssh_ecdsa_verify: signature correct debug1: ssh2_msg_newkeys sent debug1: expecting ssh2_msg_newkeys debug1: ssh2_msg_newkeys received debug1: roaming not allowed by server debug1: ssh2_msg_service_request sent debug1: ssh2_msg_service_accept received debug1: authentications that can continue: publickey,password,keyboard-interacti ve debug1: next authentication method: publickey debug1: trying private key: /home/kgraves/.ssh/id_rsa debug1: trying private key: /home/kgraves/.ssh/id_dsa debug1: trying private key: /home/kgraves/.ssh/id_ecdsa debug1: next authentication method: keyboard-interactive debug1: authentications that can continue: publickey,password,keyboard-interacti ve debug1: next authentication method: password misfitred@devilsmilk's password: debug1: authentications that can continue: publickey,password,keyboard-interacti ve permission denied, please try again. misfitred@devilsmilk's password: debug1: authentications that can continue: publickey,password,keyboard-interacti ve permission denied, please try again. misfitred@devilsmilk's password: debug1: authentications that can continue: publickey,password,keyboard-interactive debug1: no more authentication methods to try. permission denied (publickey,password,keyboard-interactive). これが私のdevilsmilk上のsshd_configファイルです。# $openbsd: sshd_config,v 1.80 2008/07/02 02:24:18 djm exp $ # this is the sshd server system-wide configuration file. see # sshd_config(5) for more information. # this sshd was compiled with path=/usr/local/bin:/bin:/usr/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 #addressfamily any #listenaddress 0.0.0.0 #listenaddress :: # disable legacy (protocol version 1) support in the server for new # installations. in future the default will change to require explicit # activation of protocol 1 #protocol 2 # hostkey for protocol version 1 # hostkey /etc/ssh/ssh_host_key # hostkeys for protocol version 2 # hostkey /etc/ssh/ssh_host_rsa_key # hostkey /etc/ssh/ssh_host_dsa_key # lifetime and size of ephemeral version 1 server key #keyregenerationinterval 1h #serverkeybits 1024 # logging # obsoletes quietmode and fascistlogging #syslogfacility auth #loglevel info # authentication: #logingracetime 2m #permitrootlogin yes strictmodes no #maxauthtries 6 #maxsessions 10 #rsaauthentication yes #pubkeyauthentication yes #authorizedkeysfile .ssh/authorized_keys #authorizedkeyscommand none #authorizedkeyscommandrunas nobody # for this to work you will also need host keys in /etc/ssh/ssh_known_hosts #rhostsrsaauthentication no # similar for protocol version 2 #hostbasedauthentication yes # 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 #kerberosgetafstoken no #kerberosusekuserok yes # gssapi options #gssapiauthentication no #gssapiauthentication yes #gssapicleanupcredentials yes #gssapicleanupcredentials yes #gssapistrictacceptorcheck yes #gssapikeyexchange no # 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 # accept locale-related environment variables #acceptenv lang lc_ctype lc_numeric lc_time lc_collate lc_monetary lc_messages #acceptenv lc_paper lc_name lc_address lc_telephone lc_measurement #acceptenv lc_identification lc_all language #acceptenv xmodifiers #allowagentforwarding yes allowtcpforwarding yes gatewayports yes #x11forwarding no x11forwarding yes #x11displayoffset 10 #x11uselocalhost yes #printmotd yes #printlastlog yes tcpkeepalive yes #uselogin no #useprivilegeseparation yes #permituserenvironment no #compression delayed #clientaliveinterval 0 #clientalivecountmax 3 #showpatchlevel no #usedns yes #pidfile /var/run/sshd.pid #maxstartups 10 #permittunnel no #chrootdirectory none # no default banner path #banner none # override default of no subsystems subsystem sftp /usr/libexec/openssh/sftp-server # example of overriding settings on a per-user basis #match user anoncvs # x11forwarding no # allowtcpforwarding no # forcecommand cvs server そして、これが私のssh_configファイルです。# $openbsd: ssh_config,v 1.25 2009/02/17 01:28:32 djm exp $ # 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 # 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 #host * # gssapiauthentication yes # if this option is set to yes then remote x11 clients will have full access # to the original x11 display. as virtually no x11 client supports the untrusted # mode correctly we set this to yes. forwardx11trusted yes # send locale-related environment variables sendenv lang lc_ctype lc_numeric lc_time lc_collate lc_monetary lc_messages sendenv lc_paper lc_name lc_address lc_telephone lc_measurement sendenv lc_identification lc_all language sendenv xmodifiers 更新要求1:/ var/log/securejan 29 12:26:26 localhost sshd[2317]: server listening on 0.0.0.0 port 22. jan 29 12:26:26 localhost sshd[2317]: server listening on :: port 22. jan 29 12:26:34 localhost polkitd(authority=local): registered authentication agent for session /org/freedesktop/consolekit/session1 (system bus name :1.29 [/usr/libexec/polkit-gnome-authentication-agent-1], object path /org/gnome/policykit1/authenticationagent, locale en_us.utf-8) jan 29 12:36:09 localhost pam: gdm-password[3029]: pam_unix(gdm-password:session): session opened for user misfitred by (uid=0) jan 29 12:36:09 localhost polkitd(authority=local): unregistered authentication agent for session /org/freedesktop/consolekit/session1 (system bus name :1.29, object path /org/gnome/policykit1/authenticationagent, locale en_us.utf-8) (disconnected from bus) jan 29 12:36:11 localhost polkitd(authority=local): registered authentication agent for session /org/freedesktop/consolekit/session2 (system bus name :1.45 [/usr/libexec/polkit-gnome-authentication-agent-1], object path /org/gnome/policykit1/authenticationagent, locale en_us.utf-8) jan 29 12:53:39 localhost polkitd(authority=local): operator of unix-session:/org/freedesktop/consolekit/session2 successfully authenticated as unix-user:root to gain temporary authorization for action org.freedesktop.packagekit.system-update for system-bus-name::1.64 [gpk-update-viewer] (owned by unix-user:misfitred) jan 29 12:54:02 localhost su: pam_unix(su:session): session opened for user root by misfitred(uid=501) jan 29 12:54:06 localhost sshd[2317]: received signal 15; terminating. jan 29 12:54:06 localhost sshd[3948]: server listening on 0.0.0.0 port 22. jan 29 12:54:06 localhost sshd[3948]: server listening on :: port 22. jan 29 12:55:46 localhost su: pam_unix(su:session): session closed for user root jan 29 12:55:56 localhost pam: gdm-password[3029]: pam_unix(gdm-password:session): session closed for user misfitred jan 29 12:55:56 localhost polkitd(authority=local): unregistered authentication agent for session /org/freedesktop/consolekit/session2 (system bus name :1.45, object path /org/gnome/policykit1/authenticationagent, locale en_us.utf-8) (disconnected from bus) jan 29 12:55:58 localhost polkitd(authority=local): registered authentication agent for session /org/freedesktop/consolekit/session3 (system bus name :1.78 [/usr/libexec/polkit-gnome-authentication-agent-1], object path /org/gnome/policykit1/authenticationagent, locale en_us.utf-8) jan 29 12:56:29 localhost pam: gdm-password[4044]: pam_unix(gdm-password:auth): conversation failed jan 29 12:56:29 localhost pam: gdm-password[4044]: pam_unix(gdm-password:auth): auth could not identify password for [misfitred] jan 29 12:56:29 localhost pam: gdm-password[4044]: gkr-pam: no password is available for user jan 29 12:57:11 localhost pam: gdm-password[4051]: pam_selinux_permit(gdm-password:auth): cannot determine the user's name jan 29 12:57:11 localhost pam: gdm-password[4051]: pam_succeed_if(gdm-password:auth): error retrieving user name: conversation error jan 29 12:57:11 localhost pam: gdm-password[4051]: gkr-pam: couldn't get the user name: conversation error jan 29 12:57:17 localhost pam: gdm-password[4053]: pam_unix(gdm-password:session): session opened for user misfitred by (uid=0) jan 29 12:57:17 localhost polkitd(authority=local): unregistered authentication agent for session /org/freedesktop/consolekit/session3 (system bus name :1.78, object path /org/gnome/policykit1/authenticationagent, locale en_us.utf-8) (disconnected from bus) jan 29 12:57:17 localhost polkitd(authority=local): registered authentication agent for session /org/freedesktop/consolekit/session4 (system bus name :1.93 [/usr/libexec/polkit-gnome-authentication-agent-1], object path /org/gnome/policykit1/authenticationagent, locale en_us.utf-8) jan 29 12:57:49 localhost unix_chkpwd[4495]: password check failed for user (root) jan 29 12:57:49 localhost su: pam_unix(su:auth): authentication failure; logname=misfitred uid=501 euid=0 tty=pts/0 ruser=misfitred rhost= user=root jan 29 12:58:04 localhost su: pam_unix(su:session): session opened for user root by misfitred(uid=501) jan 29 13:16:16 localhost su: pam_unix(su:session): session closed for user root jan 29 13:18:05 localhost su: pam_unix(su:session): session opened for user root by misfitred(uid=501) jan 29 13:21:14 localhost su: pam_unix(su:session): session closed for user root jan 29 13:21:40 localhost su: pam_unix(su:session): session opened for user root by misfitred(uid=501) jan 29 13:24:17 localhost su: pam_unix(su:session): session opened for user misfitred by misfitred(uid=0) jan 29 13:27:10 localhost su: pam_unix(su:session): session opened for user root by misfitred(uid=501) jan 29 13:28:55 localhost su: pam_unix(su:session): session closed for user root jan 29 13:28:55 localhost su: pam_unix(su:session): session closed for user misfitred jan 29 13:28:55 localhost su: pam_unix(su:session): session closed for user root jan 29 13:29:00 localhost su: pam_unix(su:session): session opened for user root by misfitred(uid=501) jan 29 13:31:48 localhost sshd[3948]: received signal 15; terminating. jan 29 13:31:48 localhost sshd[5498]: server listening on 0.0.0.0 port 22. jan 29 13:31:48 localhost sshd[5498]: server listening on :: port 22. jan 29 13:44:58 localhost sshd[5498]: received signal 15; terminating. jan 29 13:44:58 localhost sshd[5711]: server listening on 0.0.0.0 port 22. jan 29 13:44:58 localhost sshd[5711]: server listening on :: port 22. jan 29 14:00:19 localhost sshd[5711]: received signal 15; terminating. jan 29 14:00:19 localhost sshd[5956]: server listening on 0.0.0.0 port 22. jan 29 14:00:19 localhost sshd[5956]: server listening on :: port 22. jan 29 15:03:00 localhost sshd[5956]: received signal 15; terminating. jan 29 15:10:23 localhost su: pam_unix(su:session): session closed for user root jan 29 15:10:38 localhost pam: gdm-password[4053]: pam_unix(gdm-password:session): session closed for user misfitred jan 29 15:10:38 localhost polkitd(authority=local): unregistered authentication agent for session /org/freedesktop/consolekit/session4 (system bus name :1.93, object path /org/gnome/policykit1/authenticationagent, locale en_us.utf-8) (disconnected from bus) jan 29 15:11:21 localhost polkitd(authority=local): registered authentication agent for session /org/freedesktop/consolekit/session1 (system bus name :1.29 [/usr/libexec/polkit-gnome-authentication-agent-1], object path /org/gnome/policykit1/authenticationagent, locale en_us.utf-8) jan 29 15:11:32 localhost pam: gdm-password[2919]: pam_unix(gdm-password:session): session opened for user misfitred by (uid=0) jan 29 15:11:32 localhost polkitd(authority=local): unregistered authentication agent for session /org/freedesktop/consolekit/session1 (system bus name :1.29, object path /org/gnome/policykit1/authenticationagent, locale en_us.utf-8) (disconnected from bus) jan 29 15:11:33 localhost polkitd(authority=local): registered authentication agent for session /org/freedesktop/consolekit/session2 (system bus name :1.45 [/usr/libexec/polkit-gnome-authentication-agent-1], object path /org/gnome/policykit1/authenticationagent, locale en_us.utf-8) jan 29 15:15:10 localhost su: pam_unix(su:session): session opened for user root by misfitred(uid=501) jan 29 15:30:24 localhost userhelper[3700]: running '/usr/share/system-config-users/system-config-users ' with root privileges on behalf of 'root' jan 29 15:32:00 localhost su: pam_unix(su:session): session opened for user misfitred by misfitred(uid=0) jan 29 15:32:23 localhost passwd: gkr-pam: changed password for 'login' keyring jan 29 15:32:39 localhost passwd: pam_unix(passwd:chauthtok): password changed for misfitred jan 29 15:32:39 localhost passwd: gkr-pam: couldn't change password for 'login' keyring: 1 jan 29 15:33:06 localhost passwd: pam_unix(passwd:chauthtok): password changed for misfitred jan 29 15:33:06 localhost passwd: gkr-pam: changed password for 'login' keyring jan 29 15:37:08 localhost su: pam_unix(su:session): session opened for user root by misfitred(uid=501) jan 29 15:38:16 localhost su: pam_unix(su:session): session closed for user root jan 29 15:38:16 localhost su: pam_unix(su:session): session closed for user misfitred jan 29 15:38:16 localhost su: pam_unix(su:session): session closed for user root jan 29 15:38:25 localhost su: pam_unix(su:session): session opened for user root by misfitred(uid=501) jan 29 15:42:47 localhost su: pam_unix(su:session): session closed for user root jan 29 15:47:13 localhost sshd[4111]: pam_unix(sshd:session): session opened for user misfitred by (uid=0) jan 29 16:49:40 localhost su: pam_unix(su:session): session opened for user root by misfitred(uid=501) jan 29 16:55:19 localhost su: pam_unix(su:session): session opened for user root by misfitred(uid=501) jan 30 08:34:57 localhost sshd[4111]: pam_unix(sshd:session): session closed for user misfitred jan 30 08:34:57 localhost su: pam_unix(su:session): session closed for user root jan 30 08:35:24 localhost su: pam_unix(su:session): session opened for user root by misfitred(uid=501)
回答: sshdサービスを再起動してください。service --full-restart sshd