Showing posts with label sftp. Show all posts
Showing posts with label sftp. Show all posts

Saturday 22 August 2020

SSH or SFTP Authentication issue in linux

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.


Monday 29 May 2017

Important Linux TCP/IP Port Number

Please find the below complete list of TCP/IP port number in Linux system.

➤ 20- FTP ( File Transfer Protocol) -It is used for transfer the data using ftp connection

➤ 21- FTP Control - It is used this port for ftp connection.

➤ 22- SSH (Secure Shell)- It is used for connecting the secure shell which using SSL encryption.

➤ 23- TELNET - It is used for insecure remote connection.

➤ 25- SMTP (Simple Mail Transfer Protocol)- It is used as a mail transfer agent for email server.

➤ 53- DNS (Domain name system)- It is used for translate the domain name to IP address.

➤ 67- BOOTP (Bootstrap Protocol)- Used for automatically assign the IP address to network device.

➤ 68- DHCP (Dynamic host configuration protocol)- It is a network protocol to enable a server to automatically assign an IP address to system.

➤ 69- TFTP (Trivial file transfer protocol)- Used this protocol in PXE Boot services.

➤ 80- HTTP ( Hypertext Transfer protocol)- Used for WWW web connection.

➤ 88- Kerberos Protocol

➤ 110- POP3 (Post Office Protocol)- Used as a mail delivery agent.

➤ 113- XINETD (Extended Internet Daemon)

➤ 115- SFTP ( Secure File Transfer Protocol)

➤ 123- NTP (Network time protocol)- Used for time syncing uses UDP protocol

➤ 137- NetBIOS (Network basic Input/Output system)

➤ 139- NETBIOS-SESSION Service

➤ 143- IMAP (Internet Message Access Protocol)

➤ 161- SNMP (Simple Network Management Protocol)- Used for network monitoring.

➤ 389- LDAP (Lightweight Directory Access Protocol)

➤ 443- HTTPS ( Hypertext Transfer protocol secure)- Used with SSL encryption.

➤ 445- SMB (Server Message Block or SAMBA)

➤ 514- Syslogd (udp port)

➤ 840- NIS (Network Information Service)

➤ 873- rsync Used for file synchronization.

➤ 990- FTPS (File transfer protocol secure)

➤ 993- IMAPS ( For Secure Connection)

➤ 995- POP3s ( Mail delivery agent with secure connection)

➤ 2049- NFS ( Network file sharing)