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

Ruby net sftp upload file to relative path

I want to upload files to remote sftp server with relative path. For example I want to be able to upload to sftp://myserver.com/FileStore. I've tried using the following code but it does not work: NB: host is myserver.com/FileStore uri =…
zulqarnain
  • 1,695
  • 1
  • 16
  • 33
0
votes
3 answers

Trying to Net::SFTP download but get Errno::EACCES: Permission denied - Directory I'm copying to

I'm trying to copy a file from a Unix box to my local desktop but I'm getting the error: Errno::EACCES: Permission denied - C:\Users\MyUser\Desktop require 'net/sftp' Net::SFTP.start(unixBox, user, :password => password) do |sftp| …
Lifeweaver
  • 986
  • 8
  • 29
0
votes
2 answers

Net::SFTP Hangs

I'm using Net::SFTP to transfer files. However, whenever I try to create a new object like so: my $sftp = Net::SFTP->new('ip', user=>'user', password=>'pass'); It just hangs and does nothing. Does anyone know why this is? Am I doing something…
srchulo
  • 5,143
  • 4
  • 43
  • 72
0
votes
1 answer

No file or directory on launch

I'm trying to make a proof of concept script with ruby, but seem to be failing... I've give then script permission to run, but when it's ran I get ": No such file or directory" from my terminal. I do have net-sftp installed through gem, so I'm at a…
Jacobm001
  • 4,431
  • 4
  • 30
  • 51
0
votes
1 answer

RSpec: force Net::SFTP::StatusException and validate rescue

I'm trying to force an Net::SFTP::StatusException error in my spec and then validate that my code traps it. Code: def process_SFTP(username, password, csvfile) begin mySftpWrapper.new mySftpWrapper.process_CSV_file(csvfile) rescue…
Sly
  • 743
  • 13
  • 38
0
votes
1 answer

Ruby Net/SFTP throttle speed

Is there a way to throttle the connection of a transfer with the ruby Net/SFTP library? I would like to leverage this to download some backups on a nightly basis, but don't want to eat up all of the server's bandwidth while doing so.
wmarbut
  • 4,595
  • 7
  • 42
  • 72
0
votes
2 answers

UI monitoring using net-SFTP

I am developping an app and i need to download some files using sftp. I installed the gem net-sftp and its works fine. Using the monitoring process i've found on this page : http://net-ssh.rubyforge.org/sftp/v2/api/, i can see the progress in my…
0
votes
2 answers

Ruby net/sftp read file remotely and save to database, get error StatusException (4, "failure")

I'm trying to download xmls from a remote sftp site, read the contents of the file into REXML and save the data to the DB. so far the code is up to reading the file and f.gets line fails with the error:…
dlite922
  • 1,924
  • 3
  • 24
  • 60
0
votes
1 answer

net-sftp ruby, uploading file error

I have a rails 3.2.2 app that's got the net-sftp gem installed on it. I've created a simple controller to test the most basic feature of uploading a file to remote sftp. This is my controller: class UploadsController < ApplicationController …
Paz Aricha
  • 398
  • 1
  • 5
  • 14
-1
votes
1 answer

how to know sftp file transfer speed and time taken

Is there a way to calculate the time taken & the speed for downloading/uploading a file via sftp in php as similar to the below? $sftp->get('filename', 'local/filename'); //gets the file $sftp->size('filename'); //gives the size of the file. These…
kumar
  • 1,796
  • 2
  • 15
  • 37
-1
votes
1 answer

phpseclib SFTP can`t put file with special characters

Following code is used to upload file to SFTP: \SSH::into('server')->put($localFile, $remotePath); It uses phpseclib/phpseclib/Net/SFTP.php behind the scenes. Upload does not work when trying to upload file with special characters in it e.g.…
werd
  • 648
  • 4
  • 13
  • 23
-1
votes
2 answers

Ruby Net::SFTP upload hangs

I am using the net-sftp gem to upload a file to an ftp server. Here's my code: require "net/sftp" Net::SFTP.start(url, username, password: password) do |sftp| sftp.upload!(file_path, "/") end It just hangs at the upload line, and eventually…
Marina
  • 3,222
  • 5
  • 25
  • 35
1 2 3 4 5 6
7