Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: sftp connection through perl

by salva (Abbot)
on Mar 12, 2013 at 10:07 UTC ( #1022956=note: print w/replies, xml ) Need Help??


in reply to sftp connection through perl

It seems the slave SSH client process is asking for some confirmation on STDIN (that's wrong, it should be using /dev/tty). Probably, the remote host key is unknown to it and it is asking you about its validity.

Which SSH software and version are you using (ssh -V)? what is your OS?

The easiest solution to that problem would probably be to install OpenSSH and tell Net::SFTP::Foreign to use it.

Replies are listed 'Best First'.
Re^2: sftp connection through perl
by Anonymous Monk on Mar 12, 2013 at 12:35 UTC
    Thanks for repply. Below are the details: On server C ssh : OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008 OS: CentOS release 5.8 (Final) On server B ssh: OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008 OS: CentOS release 5.9 (Final)
      Aha, I see what is happening! You are using a custom transport!!!

      Probably, your script is quite old, from the days when Net::SFTP::Foreign didn't support password authentication directly and Expect was used to establish the connection and log into the server.

      Nowadays, you can pass the user and password to Net::SFTP::Foreign constructor and let it handle everything for you.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1022956]
help
Chatterbox?
[Lady_Aleena]: shmem, geany on Debian jessie.
[shmem]: some experience with vim?
[Lady_Aleena]: None
[shmem]: I don't know geany, and don't know whether it has support for ctags.
[Lady_Aleena]: ctags?
[shmem]: ctags is a program which (recursively) extracts the symbols from source and stores them in a one-file database. This allows you to query the locations where these symbols (e.g. a subroutine name) are used anywhere in the source code tree...
[shmem]: ...from inside the editor.
[shmem]: apt-get install exuberant-ctags
[Lady_Aleena]: I think I heard vim has a big learning curve.
[shmem]: then in the root of your source tree run: ctags -R

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2017-04-27 12:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (505 votes). Check out past polls.