Greetings.

I do not know if I have an ssh issue or a perl issue.

I have found myself in a bit of a bind. We had an ftp server die - corrupted disk when san switch crashed - that ran a half dozen or so transmissions to between the company and outside parties (EDI, Banking, etc).

Brief background: I came in as a contractor several months ago to handle backups mostly and some Linux, AIX and other chores. I've used Perl sparingly before, but never Net::SFTP. I've set up SSH connections, but rarely.

So here I find myself trying to restore all these FTP processes on a quickly-built Ubuntu server. I've also no previous experience with Ubuntu (to boot). They've run out of cron for years on the old system, but were written by other, long gone, administrators and are completely undocumented. One process, it turns out is using simple and totally insecure ftp that started working right away; another is straight sftp in a bash script, which I got working; now I have a perl script which uses the aforementioned module, and I am at my wits end. I installed cpan and the module.

I've been testing with a simple script that retrieves status of files previously sent, stating with the usual:

my $sftp = Net::SFTP->new($host, %args) || die "can't do it: $! : $?\n";

and it seems to connect but then fails with the following:

ftp: Reading configuration data /home/xmit/.ssh/config ftp: Reading configuration data /etc/ssh_config ftp: Connecting to 206.71.17.45, port 22. ftp: Remote version string: SSH-2.0-6.3.6.92 SSH Tectia Server ftp: Remote protocol version 2.0, remote software version 6.3.6.92 SSH + Tectia Server ftp: Net::SSH::Perl Version 2.01, protocol version 2.0. ftp: No compat match: 6.3.6.92 SSH Tectia Server. ftp: Connection established. ftp: Sent key-exchange init (KEXINIT), waiting for response. ftp: Using diffie-hellman-group-exchange-sha256 for key exchange No hostkey algorithm! CLIENT: ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ss +h-rsa SERVER ssh-dss,ssh-dss-sha256@ssh.com at /usr/local/lib/x86_64- +linux-gnu/perl/5.22.1/Net/SSH/Perl/SSH2.pm line 118.

The command is: . $HOME/.ssh/environment && /home/xmit/bin/mv-status.pl

The environment just exports SSH_AUTH_SOCK & SSH_AGENT_PID. It is how I got the bash script working, but it doesn't help here.

My first question regards the second line of the output. It is reading the ssh config from /etc/ssh_config. But, it is actually located in /etc/ssh/ssh_config. So, I created a symbolic link to the latter. But, that did not help. I feel I need to have perl look in the correct directory but I don't know how to change the config. There's probably a lot wrong with this, I just don't know what.

Any assistance would be appreciated.


In reply to change ssh_config for Net::SFTP by jazztech

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.