Command Line 'Plink':

C:\Program Files\PuTTY>plink *mycompany@host* -P *port* -v -i c:/id_cmf_mediatech.ppk sftp-server
Looking up host "*host_IP*"
Connecting to *host_IP* port *port*
Server version: SSH-2.0-OpenSSH_5.1
We claim version: SSH-2.0-PuTTY_Release_0.60
Using SSH protocol version 2
Doing Diffie-Hellman group exchange
Doing Diffie-Hellman key exchange with hash SHA-256
Host key fingerprint is:
ssh-rsa 2048 *FINGERPRINT*
Initialised AES-256 SDCTR client->server encryption
Initialised HMAC-SHA1 client->server MAC algorithm
Initialised AES-256 SDCTR server->client encryption
Initialised HMAC-SHA1 server->client MAC algorithm
Reading private key file "c:/id_cmf_mediatech.ppk"
Using username "mediatech".
Offered public key
Offer of public key accepted
Authenticating with public key "rsa-key-20081029"
Access granted
Opened channel for session
Started a shell/command

*HANGS HERE UNTIL I BREAK*

Sent EOF message
^C


Net::SFTP::Foreign code:

#228 ssh cmd: "c:/program files/putty/plink" *mycompany*@*host* -P *port* -v -i c:\id_cmf_mediatech.ppk sftp-server
#228 queueing msg len: 5, code:1, id:3 ... 1 00 00 00 05 01 00 00 00 03 | .........
#228 waiting for message... 1
Looking up host "*host_IP*"
Connecting to *host_IP* port *port*
Server version: SSH-2.0-OpenSSH_5.1
We claim version: SSH-2.0-PuTTY_Release_0.60
Using SSH protocol version 2
Doing Diffie-Hellman group exchange
Doing Diffie-Hellman key exchange with hash SHA-256
Host key fingerprint is:
ssh-rsa 2048 *fingerprint*
Initialised AES-256 SDCTR client->server encryption
Initialised HMAC-SHA1 client->server MAC algorithm
Initialised AES-256 SDCTR server->client encryption
Initialised HMAC-SHA1 server->client MAC algorithm
Reading private key file "c:\id_cmf_mediatech.ppk"
Using username "mediatech".
Offered public key
Offer of public key accepted
Authenticating with public key "rsa-key-20081029"
Access granted
Opened channel for session
Started a shell/command
#228 got it!, len:95, code:2, id:3, status: - 02 00 00 00 03 00 00 00 18 70 6f 73 69 78 2d 72 65 6e 61 6d 65 40 6f 70 65 6e 73 73 68 2e 63 6f | .........posix-rename@openssh.co 6d 00 00 00 01 31 00 00 00 13 73 74 61 74 76 66 73 40 6f 70 65 6e 73 73 68 2e 63 6f 6d 00 00 00 | m....1....statvfs@openssh.com... 01 32 00 00 00 14 66 73 74 61 74 76 66 73 40 6f 70 65 6e 73 73 68 2e 63 6f 6d 00 00 00 01 32 | .2....fstatvfs@openssh.com....2
#228 Net::SFTP::Foreign=HASH(0x226e20)->DESTROY called (current pid: 228, discon nect_by_pid: )
#228 Net::SFTP::Foreign=HASH(0x226e20)->disconnect called (ssh pid: 3028)
#228 _conn_lost
#228 _set_status code: 7, str: Connection lost
#228 _set_err code: 37, str: Connection to remote server is broken

In reply to Re^6: Help Required - Problem Automating SFTP by Kraythorne
in thread Help Required - Problem Automating SFTP by Kraythorne

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.