We normally getting a below error while accessing the destination server via SSH or SFTP protocols.
Error:
root@localhost> sftp root@XYZ.com
warning: Authentication failed.
FATAL: ssh2 client failed to authenticate. (or you have too old ssh2 installed, check with ssh2 "-V")
To resolve this error first we need to understand what is an issue. In such type of above error, issue is mostly from destination server end which you want to connect from your system.
In /etc/ssh/sshd_config file, a parameter "MaxAuth Tries" value is very less due to this when we are attempting to access the destination server using SSH or SFTP protocol then we will get such issue if your account will not authenticate in first two attempts.
So to resolve such issue , you need to increase the value of "MaxAuth Tries" from default value.
edit the /etc/ssh/sshd_config file
search this parameter
increase the value "MaxAuth Tries" to "5" and take a restart of ssh service
systemctl restart sshd
login on source server again and try to access the server, if you are facing this issue again then increase the value again and set to 20.
ReplyDeleteNice blog! Thanks for sharing this valuable information
Cyber Security Course in Pune
Cyber Security Course in Gurgaon
Cyber Security Course in Hyderabad
Cyber Security Course in Bangalore
cyber security course in delhi
cyber security course in kochi
cyber security course in ahmedabad
cyber security course in mumbai
Great Post with valuable information. I am glad that I have visited this site. Share more updates.
ReplyDeleteSpoken English Classes in Medavakkam
Spoken English Classes in Chennai Velachery
This post is so interactive and informative.keep update more information...
ReplyDeleteEthical Hacking Course in Anna Nagar
Ethical Hacking Course in Chennai
This post is so interactive and informative.keep update more information...
ReplyDeletePython Training in Tambaram
Python training in chennai