in reply to Re: SFTP can use in SSH
in thread SFTP can use in SSH

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

Replies are listed 'Best First'.
Re^3: SFTP can use in SSH
by shmem (Chancellor) on Jul 14, 2006 at 13:15 UTC
    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?