菜鸟教程小白 发表于 2022-12-12 20:50:22

iOS - SimpleFTP 如何使用 SFTP (ssh)?


                                            <p><p>我正在尝试使用 Apple 的 SimpleFTPSample 项目中的代码在我的应用程序中上传/列出目录。我能够让它在只使用 FTP 的服务器上工作,但我现在需要它在需要 SFTP 登录的服务器上工作。
有没有办法在连接时将 NSStream 设置为使用“SFTP”?</p>

<p>这是 Apple 的项目示例:<a href="https://developer.apple.com/library/ios/samplecode/simpleftpsample/introduction/intro.html" rel="noreferrer noopener nofollow">https://developer.apple.com/library/ios/samplecode/simpleftpsample/introduction/intro.html</a> </p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>FTP 和 SFTP 是非常不同的协议(protocol)。看看<a href="https://github.com/karelia/ConnectionKit" rel="noreferrer noopener nofollow">https://github.com/karelia/ConnectionKit</a> - 这是一个支持 ftp、sftp 和 webdav 传输的库</p>

<p>哎呀!我错过了 iOS 尚未准备好的地方!也许 <a href="https://stackoverflow.com/questions/14462257/sftp-libraries-for-iphone" rel="noreferrer noopener nofollow">this answer</a> 中的库会有所帮助</p></p>
                                   
                                                <p style="font-size: 20px;">关于iOS - SimpleFTP 如何使用 SFTP (ssh)?,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/22623231/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/22623231/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: iOS - SimpleFTP 如何使用 SFTP (ssh)?