ftp - Ruby Net::SFTP upload hangs -
i using net-sftp gem upload file ftp server. here's code: require "net/sftp" net::sftp.start(url, username, password: password) |sftp| sftp.upload!(file_path, "/") end it hangs @ upload line, , times out error net::ssh::disconnect: connection closed remote host . able connect via sftp using filezilla using same url, username, , password. i tried running non-block version verbose: :debug as well: sftp = net::sftp.start(test.ftphost.com, ftp_username, password: ftp_password, verbose: :debug) ^ produced output shows connection good: i, [2015-04-29t10:32:51.381339 #25769] info -- net.ssh.connection.session[3fc8a502c24c]: channel_success: 0 d, [2015-04-29t10:32:51.381429 #25769] debug -- net.sftp.session[3fc8a5025d70]: sftp subsystem started then entered following: sftp.upload!("/users/marina/desktop/test.png", "/") the output stuck this: i, [2015-04-29t10:32:55.035471 #25769] info -- net.sftp.session[3fc8a5025d70]: se