How to connect to COSMIC sftp server using Net::SFTP in Perl
0
0
Entering edit mode
7.4 years ago
cookersjs ▴ 30

Hello,

I am attempting to write code in perl that would allow me to download files from COSMICs SFTP server. I have never done this and I believe that is the major source of my troubles. I have been able to login using HTTP::Request::Common at https://cancer.sanger.ac.uk/cosmic/login, but in terms of accessing the SFTP server I have not had much luck.

My code:

 use strict;
 use warnings;
 use Net::SFTP;

my $SFTPSite = "sftp-cancer.sanger.ac.uk";
my $userid = "username\@email.com";
my $pword = "*********";

my $sftp = Net::SFTP->new( $SFTPSite, $userid, $pword ) or die "Could NOT create SFTP\n";

My error message:

Can't connect to sftp-cancer.sanger.ac.uk, port 22: Connection timed out at /home/jcook/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux/Net/SSH/Perl.pm line 215.

Any suggestions would be greatly appreciated

Thanks!

perl cosmic ubuntu sftp • 2.3k views
ADD COMMENT
3
Entering edit mode

Have you tried to connect from the command line?

If you require further assistance please contact cosmic@sanger.ac.uk

ADD REPLY

Login before adding your answer.

Traffic: 1515 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6