oracle 11g r2 rac ssh兩節點互信對等配置Permission denied (publickey,gssapi-with-mic,password)

問題:安裝oracle 11g r2 RAC grid 時,配置兩節點ssh互信對等配置不成功,具體錯誤信息如下:

------------------------------------------------------------------------

Verifying SSH connectivity has been setup from rac1 to rac1

------------------------------------------------------------------------

IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL.

grid@rac1's password: 

Permission denied, please try again.

Permission denied, please try again.

Permission denied (publickey,gssapi-with-mic,password).

------------------------------------------------------------------------


配置ssh對等的時候的運用腳本如下:

./sshUserSetup.sh -user grid -hosts "rac1 rac2" -advanced -exverify -confirm -noPromptPassphrase


環境爲 oracle linux 5.5,RAC兩節點的主機名爲:rac1 rac2。

原始配置/etc/ssh/sshd_config文件爲:

# 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

#Protocol 2,1

Protocol 2

#AddressFamily any

#ListenAddress 0.0.0.0

#ListenAddress ::


# 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 768


# Logging

# obsoletes QuietMode and FascistLogging

#SyslogFacility AUTH

SyslogFacility AUTHPRIV

#LogLevel INFO


# Authentication:


#LoginGraceTime 2m

#PermitRootLogin yes

#StrictModes yes

#MaxAuthTries 6


#RSAAuthentication yes

#PubkeyAuthentication yes

#AuthorizedKeysFile     .ssh/authorized_keys


# For this to work you will also need host keys in /etc/ssh/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

PasswordAuthentication yes


# Change to no to disable s/key passwords

#ChallengeResponseAuthentication yes

ChallengeResponseAuthentication no


# Kerberos options

#KerberosAuthentication no

#KerberosOrLocalPasswd yes

#KerberosTicketCleanup yes

#KerberosGetAFSToken no


# GSSAPI options

#GSSAPIAuthentication no

GSSAPIAuthentication yes

#GSSAPICleanupCredentials yes

GSSAPICleanupCredentials yes


# 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 mechanism.

# Depending on your PAM configuration, this may bypass the setting of

# PasswordAuthentication, PermitEmptyPasswords, and

# "PermitRootLogin without-password". If you just want the PAM account and

# session checks to run without PAM authentication, then enable this but set

# ChallengeResponseAuthentication=no

#UsePAM no

UsePAM yes

解決方案:

根據錯誤提示“Permission denied (publickey,gssapi-with-mic,password).“

於是打開/etc/ssh/sshd_config配置文件,將上述標紅的配置修改

#RSAAuthentication yes

PubkeyAuthentication yes

AuthorizedKeysFile     .ssh/authorized_keys

啓用publickey認證,同時必須保證PasswordAuthentication yes必須yes狀態。

重啓ssh服務

service sshd restart

然後再運行腳本,

./sshUserSetup.sh -user grid -hosts "rac1 rac2" -advanced -exverify -confirm -noPromptPassphrase

ssh 對等互信配置成功

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章