Bobcares

sftp error code 255 – How to make it work!

by | Nov 16, 2019

Are you struggling with sftp error code 255?

SFTP is a secure method for file upload.

However, it often shows errors when the remote server is down/unavailable, the remote machine doesn’t have ssh access or has firewall restrictions.

At Bobcares, we often get requests from our customers to fix an error message sftp error code 255 as part of our Server Management Services.

Today, let’s get into the details on how our Support Engineers fix this error.

 

Why sftp error code 255?

Usually, the exit code 255 is a frequent error that happens due to the problem in SSH access.

The error appears like the following

SFTP error 255

The following reasons are the common cause of this error.

If the remote server to which we are trying to connect is unavailable or down, then the connection via sftp has not been established, and so we received this error.

In addition to this, we will get the same error if the remote server is not having the ssh access to the server or if there is any firewall restriction.

Now let’s detail the reason for this error and how our Support Engineers fix the problem.

 

The causes and fixes of sftp error code 255

At Bobcares, where we have more than a decade of expertise in managing servers, we see many customers facing problems with error sftp error code 255.

Now, let’s see the major reasons for this sftp related errors and how our Support Engineers fix them.

 

1. Missing RSA key

Recently, while connecting to the server via sftp one of our customers was getting the error sftp error code 255. Initially, his public key authentication was successful. But after a while, the connection got disconnected.

On checking, our Support Engineers found that the public key was working and could not trace anything wrong with it. However, we found that he had only created DSA keys, and RSA keys were missing.

Therefore, we created RSA keys and also inserted the public keys in his authorized keys file, then everything worked fine.

This resolved the error and the customer could regain sftp connection.

 

2. Firewall restrictions

Firewall restrictions can also be a reason for sftp failure. It will restrict unauthorized IP access or port access to the server for security purposes.

Sometimes, the error sftp error code 255 happens due to the sftp port restricted in the firewall. In such cases, our Support Engineers will first check for any firewall restrictions. Firewall restrictions can cause timeout errors while trying to connect to the server using sftp.

This has been caused due to some server-side settings or sftp port (default 22)blocks on the network.

So, our Support Engineers check the log files and confirm that it does not cause the sftp to exit connection.

For instance, we check the IPtables to see if there are any IP restrictions.

iptables -nL | grep xx.xx.xx.xx

If so, we will remove the IP restrictions to fix this error.

 

3. Permission of sftp

Sometimes, if there was no sftp server on the remote end, customers will receive the same error. Here, our Support Engineers confirm the working of the sftp server.

Another important cause to receive this error is incorrect permission of /home/user and .ssh folder on the remote server.

Here, we check the permission of the user and .ssh folder and correct it as follows.

chmod 755 /home/user
chmod 700 /home/user/.ssh

Generally, the /home/user folder should be with 755 permission and the .ssh folder is with 700 permission.

By ensuring this, we can avoid unwanted errors happens while connected to the remote server via sftp.

[Struggling with sftp connection errors? We are here to help you.]

 

Conclusion

In short, sftp error code 255 error has been received mainly due to the problems in the remote server such as missing RSA keys, firewall restrictions, and so on. Today we discussed the reasons causing sftp error code 255 and saw how our Support Engineers fix this error for our customers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF