in reply to SFTP can use in SSH

veeruch,

A lot of your recent questions are in this area, have you read the documentation for these modules properly?

'2)Can we write SSH object for SFTP.. is it posslible?'

Perhaps I am not understanding what you mean here, but did you read the documentation?

'Net::SFTP is a pure-Perl implementation of the Secure File Transfer Protocol (SFTP) - file transfer built on top of the SSH2 protocol. Net::SFTP uses Net::SSH::Perl to build a secure, encrypted tunnel through which files can be transferred and managed.'

'3)how can i give command transfering binary or ascii in NET::SFTP?'

SFTP effectively uses binary mode for all transfers.

Martin

Replies are listed 'Best First'.
Re^2: SFTP can use in SSH
by veeruch (Sexton) on Jul 14, 2006 at 12:51 UTC

    yes you told right ...how can i give ascii transfer bcoz if iam transfer in binary mode from windows machine to unix it is adding CTRL_M charters r adding for that wht i have do ...

    i can't use sftp->cmd for net sftp->cmd ,in that they have written Net::SSH::W32Perl wroking on SSH2 protocal SSH2 protocal supports multiple cmds.but here mycode not supporting

      The Ctrl-M chars don't get added during transfer, rather they are not stripped. Windows text file have CRLF line endings.

      To get rid of the Ctrl-M chars on a UNIX box, do:

      perl -pi -e 's/\r\n/\n/' filename

      You should adhere to the usage of the modules as layed out in their respective documentation.

      --shmem

      _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                    /\_¯/(q    /
      ----------------------------  \__(m.====·.(_("always off the crowd"))."·
      ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

        Hi
        iam wroking windows environmet(active state perl)
        I have Net-SSH-Perl 1.23_01 Net-SSH-W32Perl 0.05 Win32 (ActivePerl) Compatibility Layer for Net::SSH::Perl
        in my code first invocation of cmd, then disconnect;
        then connect again on the second invocation of cmd, then disconnect again.
        but it is happend SSH1 protocol
        throw SSH2 we can slove so i have give in my code like this protocal=>2,1,
        still same problem wht i have to do
        is it required to update the version Net-SSH-Perl?