Questions tagged [net-sftp]

Net/SFTP is a ruby library for interfacing with native SFTP connections. It is related to Net/SSH, Net/SCP and others.

Net/SFTP is a ruby library for interfacing with native SFTP connections. It is related to Net/SSH, Net/SCP and others. Project Info

102 questions
0
votes
1 answer

Connection timing out?

I have simple connection object require 'net/sftp' @con = Net::SFTP.start(@@host, @@username, :password => @@password ... @con.upload!(filepath, destination) I have this in a script that listens for files being dropped into a folder. The files are…
SpeedOfRound
  • 1,210
  • 11
  • 26
0
votes
1 answer

Rails Net::SFTP connection timeout

I'm trying a command from the docs for Net::SFTP (https://github.com/net-ssh/net-sftp), here is my code: Net::SFTP.start(*sftp_credentials) { |sftp| sftp.dir.foreach("/") { |entry| puts entry.longname } } And this is the response I…
Mirror318
  • 11,875
  • 14
  • 64
  • 106
0
votes
0 answers

adding port to net_sftp

I have a bit of PHP code that is responsible for logging into a SFTP server, it was working well before but now I need to add a port to the URL original code was as follows $sftp = new Net_SFTP('sftp.sftpurl.co.uk'); if (!$sftp->login('username',…
stiloride
  • 3
  • 2
0
votes
2 answers

How to read the content in a file which is residing in SFTP using c#

I want to read the content in a file which is residing in SFTP using c#. I'm able to fetch the file from the SFTP and download it. I want to read the data in the file without downloading. Could anyone help me on this? foreach (var fi in…
sreeprasad k s
  • 53
  • 1
  • 1
  • 9
0
votes
0 answers

How to make Ruby Net::SFTP not block, so I can begin streaming a remote download immediately?

How can I acquire a remote file using Net::SFTP and stream it without waiting for the entire file to download? My test.zip file is 1GB in size. When I run this code my browser does nothing for several minutes and then the download finally begins. …
gdonald
  • 984
  • 2
  • 12
  • 23
0
votes
1 answer

unix utility that reads files into memory?

I am using Ruby's net-ssh library to remotely execute shell commands. I would like to read a few files into memory rather than simply transfer them via SCP/SFTP. Can can I do this?
user276712
  • 862
  • 4
  • 12
  • 20
0
votes
1 answer

Files not uploading to remote server with Net_SFTP

I have the following class for uploading files in a directory, however, the first directory that should be created is getting set up as 'File' rather then a 'File Folder'. Because of that, the items that should be uploaded are not uploading…
Michael Gibson
  • 29
  • 1
  • 12
0
votes
0 answers

How to execute certain part of code (eg sftp download) in php in certain time interval? If time exceeds, exception is to be handled

I want to put time interval for sftp connection in php. If the time exceeds 60 seconds to connect to it, then it should be disrupted and exception is to be handled. I don't really know how to do it. I tried to do: set_time_limit(60) But, it does…
nirazlatu
  • 983
  • 8
  • 18
0
votes
0 answers

Ruby net-sftp changes the forwardtick for an interrogation symbol on the remote server

Hello im using the gem net-sftp to upload a list of files, the upload proceess works as expected but when I upload a file that has a forwardtick on the name the forwardtick is changed on the remote server by a '?' Code local_file =…
Rodrigo Montano
  • 303
  • 5
  • 13
0
votes
0 answers

End of file error on sftp transfer with phpseclib

I'm trying to transfer files from one server to another using phpseclib and the Net_SFTP get() function. The problem that I'm running into is that about half the time, the file doesn't actually transfer over. I have 10 files that are supposed to be…
Eric Strom
  • 715
  • 9
  • 20
0
votes
1 answer

Rails: update controller with sidekiq result

Good morning! I have a form that takes in an IP, start date, and stop date that calls a SideKiq worker that executes a script on an external server through ssh, then sFTPs the resulting file to the local server. Controller method: def create …
0
votes
2 answers

Error when uploading file using Rails gem Net::SFTP: no such file

I am trying to upload a file to a server using the Net::SFTP gem. My code is as follows: remote_path = "path/of/remote/file.txt" local_path = "path/to/local/file.txt" Net::SFTP.start("SERVER", "USER", :password => "PASSWORD") do |sftp| …
dremme
  • 739
  • 2
  • 10
  • 18
0
votes
1 answer

Error install IO::Pty perl

install IO::Pty cpan Tty.xs:54:23: sys/ioctl.h: No such file or directory Tty.xs: In function `make_safe_fd': Tty.xs:225: error: `F_DUPFD' undeclared (first use in this function) Tty.xs:225: error: (Each undeclared identifier is reported only…
0
votes
1 answer

Net::SFTP::StatusException with CarrierWave on delete

I'm trying to call event.destroy on an event in my app. Each event has an uploaded image using carrierwave. When I try to destroy an event that has had an image uploaded, and then the event gets edited and a new image gets uploaded I get returned…
DevanB
  • 377
  • 1
  • 6
  • 16
0
votes
2 answers

no such method jsch.JSch.setLogger

The below behavior occurs when i call the getSftpUtil(). I have also ensured that all the appropriate jars are in the maven project's external libraries and are available in the WEB-INF/lib folder of the project code net.sf.opensftp.SftpUtil util =…
bouncingHippo
  • 5,940
  • 21
  • 67
  • 107