0 votes
by (250 points)


Can I create symbolic link using Rebex SFTP library? I can not find any suitable method in Sftp class to create symlinks. I suppose that it is possible to create symbolic link via SFTP protocol because sftp tool on Linux can do this:


If there is no such functionality in Rebex SFTP library, could you please add it?

Applies to: Rebex SFTP

1 Answer

0 votes
by (144k points)

Update: Sftp.CreateSymlink method was added in Rebex SFTP 2015 R1.

Yes, we can add this. We originally didn't because this functionality is problematic - OpenSSH wrongly implemented the corresponding SFTP command and reversed the arguments by a mistake. When they found out later, they refused to fix this and kept the reversed order. As a result of this, there are now two different and incompatible forms of the SSH_FXP_SYMLINK command. See section 3.1 of OpenSSH protocol extensions and deviations document for details.

Unfortunately, even if we add some kind of server detection, this functionality will still be problematic - some servers choose to follow OpenSSH's deviation in order to be compatible with OpenSSH's client.