Hi All Monks,
I have yet one more problem in my backup program (http://migas.kicks-ass.org/index.php?pag=en.myapps&subpag=simplebackup)...
I want to add the sftp option to it, and i'm trying to use the Net::SFTP Module but the module causes the program to stop dead ... has in dead in the water, i can't control the sftp connection/login.
Here is my log of connection...
migas: Reading configuration data /root/.ssh/config
migas: Reading configuration data /etc/ssh_config
migas: Allocated local port 1023.
migas: Connecting to localhost, port 443.
migas: Remote version string: SSH-1.99-OpenSSH_3.9p1
migas: Remote protocol version 1.99, remote software version OpenSSH_3.9p1
migas: Net::SSH::Perl Version 1.30, protocol version 2.0.
migas: No compat match: OpenSSH_3.9p1.
migas: Connection established.
migas: Sent key-exchange init (KEXINIT), wait response.
migas: Algorithms, c->s: 3des-cbc hmac-sha1 none
migas: Algorithms, s->c: 3des-cbc hmac-sha1 none
migas: Entering Diffie-Hellman Group 1 key exchange.
migas: Sent DH public key, waiting for reply.
migas: Received host key, type 'ssh-dss'.
migas: Host 'localhost' is known and matches the host key.
migas: Computing shared secret key.
migas: Verifying server signature.
migas: Waiting for NEWKEYS message.
migas: Enabling incoming encryption/MAC/compression.
migas: Send NEWKEYS, enable outgoing encryption/MAC/compression.
migas: Sending request for user-authentication service.
here the program shell's out
I can't control not even with using eval{ ... }
Here is a sample code
$network_debug_level_real = 1;
my $network_server = "localhost";
my $network_server_port = 22;
my $network_username = "some_valid_user";
my $network_password = "some_valid_password";
my $network_connection_p;
my %ssh_config = (
port => $network_server_port,
debug => $network_debug_level_real,
);
my %sftp_config = (
user => $network_username,
password => $network_password,
debug => $network_debug_level_real,
ssh_args => \%ssh_config,
);
print "before connection\n";
$network_connection = Net::SFTP->new($network_server, %sftp_config );
print "after connection\n";\n"; # This never run's the program shell's
+ out
SSH and SFTP works using the ssh tools so i know the server is fine.
PS 1: has you can notice the program and the ssh server is running on the same machine.
PS 2: the debug messages appear very slowly.
PS 3: the ssh server gives a timeout error on syslog while waiting for authentication.
Any help would be greateful
Migas - Miguel
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.