Apache Maven Wagon implementation using strictly sftp utility
This project is solving the same issue as existing Apache Maven Wagon ssh-external but it supports following sshd configuration (which ssh-external, at the time of writing this readme, does not):
Match group maven
ChrootDirectory /path/to/repo/
X11Forwarding no
AllowTcpForwarding no
AllowAgentForwarding no
ForceCommand internal-sftp
Official ssh-external uses scp utility to upload files and then ssh to change ownership of uploaded files. But,
sshcommand cannot be used because ofForceCommand internal-sftpwhich forbids anything else than sftp.scputility requires OpenSSH version >= 9.x to work withForceCommand internal-sftpwhich causes issues with older clients
Thus, my implementation simply relies only on /usr/bin/sftp, which works with mentioned ForceCommand internal-sftp.
I invite developers of ssh-external to merge or otherwise use this idea or my source code in official ssh-external project.
More info about the issue described is also published here:
https://serverfault.com/questions/420457/openssh-anything-like-internal-sftp-but-for-scp
Disclaimer, this code:
- is only tested in my own environment
- it needs a little bit of work to be usable on Windows
- it comes without any unit tests