SSH Public Key - No supported authentication methods available (server sent public key)
book
Article ID: CTX587665
calendar_today
Updated On:
Description
Citrix ADC: SSH is not working
Resolution
After Applying Terrapin workaround SSH is not working.
Method : - 1
- Both Primary and Secondary ADCs were not accessible via ssh/sftp/ftp/scp
- After ssh into secondary and got the below error:
SSH Public Key - No supported authentication methods available (server sent public key)
Which means the PasswordAuthentication was set to No inside sshd_config file
- Only console access was available and could not find any error due to continuous messages on the console. However output of cat sshd_config was able to confirm that PaaswordAuthetication was set to No
- Unable to edit using editors due to a lot of console messages.
- Tried command by typing in letters one by one continuously onto the console: more sshd_config | grep -v 'PasswordAuthentication no' >> sshd_confifg.1
- Using this command we saved everything from sshd_config (excluding line: PasswordAuthentuication No) into sshd_config.1
Added a line into sshd_config.1
using echo command: echo "PasswordAuthentication Yes" >> sshd_config.1 - Deleted sshd_config file: rm sshd_config
- Renamed sshd_config.1 to sshd_config: mv sshd_config.1 sshd_config
- Killed sshd: ps -aux | grep sshd Took process ID from there and ran the command: kill <P.ID>
After few seconds, ssh was working for secondary node
Method :- 2
- On primary node sshd_config was empty.
- Used sshd_config.aws
- Copied ssh_config.aws data into sshd_config: cp sshd_config.aws sshd_config
- Started the SSH daemon by using the command below: /etc/sshd start
- We received same error that we received in secondary unit.
- Unable to edit using editors due to a lot of console messages.
- Tried command by typing in letters one by one continuously onto the console: more sshd_config | grep -v 'PasswordAuthentication no' >> sshd_confifg.1
- Using this command we saved everything from sshd_config (excluding line: PasswordAuthentuication No) into sshd_config.1
Added a line into sshd_config.1
using echo command: echo "PasswordAuthentication Yes" >> sshd_config.1 - Deleted sshd_config file: rm sshd_config
- Renamed sshd_config.1 to sshd_config: mv sshd_config.1 sshd_config
- Killed sshd: ps -aux | grep sshd Took process ID from there and ran the command: kill <P.ID>
- After few seconds we were able to SSH/winscp/FTP/SCP into primary node as well.
NOTE: Make a Backup of new sshd_config by copying it into nsconfig: cp sshd_config ../nsconfig.
Create a soft link if possible
Problem Cause
Broken sshd file and need to restore the previous file in order to make it work.
Issue/Introduction
Fixed sshd_config to regain access
Was this article helpful?
thumb_up
Yes
thumb_down
No