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
1
vote
2 answers

Net::SFTP hangs in apache environment

I am finding that apache environment lacks something that bash has to make an ssh request. The question is, is there any way to bring that something in, or do I have to run SSH/SFTP requests from shell? I am running an sftp login with username and…
KateYoak
  • 1,591
  • 3
  • 18
  • 34
1
vote
0 answers

How to do SFTP transfer in batches?

Context: I have approx. 20K files to be transferred via SFTP. I am skeptical that if I send them in single session then session might terminate midway. I tried searching for timeout but what I found was timeout for idle session. So I was trying to…
Anand Bait
  • 331
  • 1
  • 12
1
vote
1 answer

Ruby and Net::SFTP: why can't I move this to a separate function?

Writing a function that checks via SFTP if a file is present on the server. I have written a function sftp_file_exists_1? that works. Now I want to split this function into two functions, and to my surprise, this does not work. require…
Lasse Kliemann
  • 279
  • 2
  • 8
1
vote
1 answer

Trying to implement Dual Authentication in SFTP

As per my client's requirement, I am trying to implement dual authentication (password, key) in SFTP file transfer and the preferred authentication must be in an order of password, public key, keyboard-interaction. I have tried to achieve this in…
1
vote
0 answers

Blocking SFTP connections in test - Ruby on Rails

My Rails app is using the net sftp gem to connect to a third party server and retrieve files there. The problem is, they will block the connection if we attempt to connect too many times consecutively. Our code retrieves the file once a day at…
Ccyan
  • 1,057
  • 12
  • 32
1
vote
1 answer

Net::SFTP with .ppk key authentication

I've been train to setup the connection from Ruby on rails to a SFTP server, but it fails on everything I try! This is what I am using, following the documentation and some articles on stackoverflow. Net::SFTP.start( host, user, key_data: [],…
R Kurti
  • 23
  • 5
1
vote
1 answer

SFTP remove permission denied

I'm using SFTP client for fetching files froma SFTP server. I'm able to successfully read the file and store it, but I'm unsable to delete it from SFTP server after I'm done saving it. CODE require 'net/sftp' class Sftp def self.save …
Abhi
  • 4,123
  • 6
  • 45
  • 77
1
vote
0 answers

Using SSH.NET on C# Console application in Visual Studio 2008 and .NET Framework 3.5

I have a Visual Studio 2008 project in C# with .NET Framework 3.5 and I would like to use SSH.NET library but I see no binaries there for last stable release 2016.0.0. Also in home page says it has been moved to here. Once I go to this page, I see…
Willy
  • 9,848
  • 22
  • 141
  • 284
1
vote
2 answers

Perl reading files from SFTP server

It has been awhile since I have used perl and I am attempting to print out a list of files on a SFTP server. This is my Perl script - #! /usr/bin/env perl use strict; use warnings; use feature qw(say); use autodie; use Net::SFTP::Foreign; # US…
Craig
  • 1,205
  • 2
  • 21
  • 54
1
vote
0 answers

Ruby : Using NET::SFTP i am unable to pass directory path dynamically

For Example: snippet of the code fname=gets.to_s sftp.download!("/Users/#{fname}", ".") It gives me download.rb error with no such file(2) under on_open. But the same works when i am mentioning the full path directly on the path. Its not working…
Ulag
  • 11
  • 2
1
vote
0 answers

Ruby SFTP issue

I am brand new to Ruby programming. Shortly after completing some free online lessons, I decided I wanted to complete a real world practical script. I want to automate some file transfers using the SFTP protocol. I have installed the required gems…
1
vote
0 answers

Showing percentage complete for Net::Sftp upload

I'm trying to figure out how to log the percentage complete while executing a Net::Sftp upload. Would like to log for every 10% completed, so something like: "Upload: foo.txt -> /remote/path - 10 % Complete" "Upload: foo.txt -> /remote/path - 20 %…
Jackson
  • 6,391
  • 6
  • 32
  • 43
1
vote
3 answers

Net::SFTP Errors

I have been trying to download a file using Net::SFTP and it keeps getting an error. The file is partially downloaded, and is only 2.1 MB, so it's not a huge file. I removed the loop over the files and even tried just downloading the one file and…
covard
  • 1,667
  • 2
  • 18
  • 33
1
vote
1 answer

Store SSH Key on Heroku to Connect Rails App to Remote Thru SFTP

This is a long shot, but I'm trying to add an ssh key to a Heroku for its use in connecting to another server through SFTP: Net::SFTP.start(HOST, USER, password: PASSWORD, keys: ['yada.pem']) do |sftp| @sftp = sftp end My original solution was to…
Eric H.
  • 6,894
  • 8
  • 43
  • 62
1
vote
2 answers

FTP/SFTP Server thats scriptable

I am looking for a windows FTP/SFTP server software that I can administrate (partly) by scripting against it, or if it has a .NET or COM API but at the end of the day I need to execute scripts/tasks against it that adds accounts and such. I have…
jmw
  • 2,864
  • 5
  • 27
  • 32