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
3
votes
1 answer

Net::SFTP Transfer Mode (Binary vs Text)

Is there a way using the Net::SFTP Library in Ruby (API Link) to set the Transfer Mode to Binary? I am unforunately on a windows system and am uploading a UTF-8 file to a Unix system. The ruby library apparently using Text as the default Transfer…
wmarbut
  • 4,595
  • 7
  • 42
  • 72
3
votes
4 answers

How to SSH into a server and then SFTP from there to another server?

Here's the situation: I have SSH access to ServerA I have SFTP access to ServerB, but only from ServerA I want to use Ruby to SSH into ServerA, then SFTP files from ServerB to ServerA. I can connect to ServerA using the documentation from…
jemminger
  • 5,133
  • 4
  • 26
  • 47
3
votes
1 answer

Net::SFTP perl rsa authentification

I've been trying to sftp with the package Net::SFTP and an RSA key. I can manually sftp without password to my sftp server but when using the package it doesn't work. I'm running out of idea. my $ftp = Net::SFTP->new($HOST, user => $USER, ssh_args…
martinjack
  • 51
  • 6
3
votes
1 answer

Not able to use 'copy_perm' option in Net::SFTP::Foreign module

I want to copy the file from remote host to the local host with the preservation of file permission, hence i tried to use the 'copy_perm' option as per the documentation of Net::SFTP::Foreign as mentioned below - my $sftp = Net::SFTP::Foreign->new( …
CodeQuestor
  • 881
  • 1
  • 11
  • 25
3
votes
1 answer

Is there any way to get the date modified from Net::SSH or NET::SFTP commands in ruby?

Is there an easy way to get the date modified of a file by using Net::SFTP? It'd be nice to be able to do this: Net::SFTP.start('some_server') do |sftp| sftp.dir.glob('*').each do |file| puts file.mtime end end But that's not possible (to…
btelles
  • 5,390
  • 7
  • 46
  • 78
3
votes
3 answers

Table files transfered between servers flags table as crashed

Work has a web site that uses large data sets, load balanced between two MySQL 5.6.16-64.2 servers using MyISAM, running on Linux (2.6.32-358.el6.x86_64 GNU/Linux.) This data is being updated hourly from a text based file set that is received from a…
Quintium
  • 499
  • 5
  • 22
3
votes
2 answers

Any opensource library for accessing SFTP & VPN Tunnel - FTP using C#

HiI need to access the files available in sftp using SFTP in my project (C#).Are there any opensource C# libraries for accessing file available on SFTP folder which can be used in my project? nrk
nRk
  • 1,251
  • 7
  • 24
  • 50
3
votes
3 answers

Simple Ruby SFTP example syntax error

I have an issue that seems like very flaky behavour, is this a problem with Ruby or something I've done? Please help - my project is stalled until I resolve this. Given this code running on Mac OS Leopard: require 'uri' require 'net/ssh' require…
Justicle
  • 14,761
  • 17
  • 70
  • 94
2
votes
2 answers

Ruby Net::SFTP transfer interrupt handling

How to handle Ruby Net::SFTP transfer interruption like network disconnection? When I run my example code and the network is disconnected during the transfer, application stays running. require…
matejuh
  • 396
  • 4
  • 13
2
votes
2 answers

How to create nested directories using Net::SFTP (Ruby)

I am trying to create multiple directories at once. Currently, the sftp.mkdir! path only creates one directory level at a time. For example, I can create /test, and then have to make another directory /test/secure_token and so on so forth. Is there…
smmr14
  • 161
  • 1
  • 1
  • 3
2
votes
1 answer

End of file error for phpseclib for any file get

I'm getting a NET_SFTP_STATUS_EOF: End of file error for any file downloaded from a particular SFTP Server using phpseclib. A similar question was asked here though I don't think it has any resolution. Oddly though, all the files seem to be…
Matthew Knill
  • 252
  • 2
  • 7
2
votes
1 answer

Rails Net::SFTP - is there a way to use an FTP connection (instead of sFTP)?

We have built a pretty complex plugin inside our system that's using the Net::SFTP gem to connect to a remote server. Everything works well. One of our new customers, though, showed up and prepared for us a server where we can log in only with FTP,…
user984621
  • 46,344
  • 73
  • 224
  • 412
2
votes
1 answer

Upload file over SFTP with Net::SFTP::Foreign

I have a file Test1.csv on my local machine. I have a Perl script to copy this file to a remote location (home/inbound) through an SFTP connection. Below is my code use Net::SFTP::Foreign; use warnings; use strict; my $host = "sftp.abcd.com"; my…
Sarath
  • 39
  • 1
  • 8
2
votes
1 answer

Ruby: Net::SFTP get file path

How do we get the file full path in response when we use method sftp.dir.entries? I want the file content of a directory(recursive). I have used sftp.dir.entries method to list the files present. How should I get the contents?
user3636388
  • 187
  • 2
  • 24
2
votes
1 answer

How to find the age of the file in SFTP using perl?

I am connecting SFTP and downloading the file using perl. I want to download the file that is created/modified 1 hours back. The below is code snippet. use strict; use Net::SFTP::Foreign; my…
Madhan
  • 1,291
  • 3
  • 21
  • 34