0 votes
by (230 points)
retagged by

Is there a way to change the Version String that is sent by SFTP server when a connection is first made?

For example, if the version string that is sent looks like this:

SSH-2.0-RebexSSH_5.0.7805.0

And I would like to make it custom like:

SSH-2.0-MyCustomSFTP_1.1.1

1 Answer

+1 vote
by (18.0k points)
selected by
 
Best answer

You can achieve it by setting the config key softwareVersion (in section ssh). See more in the server configuration doc.

You can also set it using Web Administration on the
Server configuration page (section Additional SSH settings).

by (230 points)
Is this option also available in the FileServer component?  How would I set it there?
by (144k points)
In Rebex FileServer component, you can change the SSH software version string using the following code:

    var server = new FileServer();
   Rebex.Security.Cryptography.CryptoHelper.SetOption(server.Settings.SshParameters, "SoftwareVersion", customSoftwareVersionString);

However, please be aware that those strings are intended to be used by SSH implementations to determine whether to apply various workaround or features - see RFC 4253:
    The 'softwareversion' string is primarily used to trigger compatibility extensions and to indicate the capabilities of an implementation.

This means that changing the string could potentially trigger interoperability issues that would not occur otherwise.
by (230 points)
Thanks! understood
...