PSFTP Scripting problem

From Visual Basic to GNU C, this is the place to talk programming.

Moderators: SecretSquirrel, just brew it!

PSFTP Scripting problem

Postposted on Thu Jul 09, 2009 7:57 am

Hi there,

Any one can help me on this currently i write a script and having output log problem show as below

C:\>sftp -2 -v abc@111.111.11.11 -pw mytext -b CHKCONNECT.txt
Server version: SSH-2.0-WeOnlyDo 2.0.0
We claim version: SSH-2.0-PuTTY_Release_0.58
Using SSH protocol version 2
Using Diffie-Hellman with standard group "group14"
Doing Diffie-Hellman key exchange
Host key fingerprint is:
ssh-rsa 1024 88:4h:63:17:9j:cj:0j:3j:8j:ej:6j:bj:4j:8j:aj:11
Initialised AES-256 client->server encryption
Initialised HMAC-SHA1 client->server MAC algorithm
Initialised AES-256 server->client encryption
Initialised HMAC-SHA1 server->client MAC algorithm
Using username "abc".
Sent password
Access granted
Opened channel for session
Started a shell/command
Connected to 111.111.11.111
Remote working directory is /
Remote directory is now /NEW/
Listing directory /NEW/
drw-rw-rw 1 root root 0 Jun 25 16:25 .
drw-rw-rw 1 root root 0 Jun 25 16:25 ..
-rw-rw-rw 1 root root 1751 Jun 25 16:25 test
-rw-rw-rw 1 root root 439 Jun 25 16:25 testfile.txt
Sent EOF message

After the script completed it show on the screen and with detail of the directory list this correct but once i output the directory list to output log.txt file if didnot show on the screen and also didn't show on the log.txt file.

Following is the screen print after i have added in the output log.txt at the back of the command.

c:\>sftp -2 -v abc@111.111.11.11 -pw mytext -b CHKCONNECT.txt 1> log.txt
Server version: SSH-2.0-WeOnlyDo 2.0.0
We claim version: SSH-2.0-PuTTY_Release_0.58
Using SSH protocol version 2
Using Diffie-Hellman with standard group "group14"
Doing Diffie-Hellman key exchange
Host key fingerprint is:
ssh-rsa 1024 88:4h:63:17:9j:cj:0j:3j:8j:ej:6j:bj:4j:8j:aj:11
Initialised AES-256 client->server encryption
Initialised HMAC-SHA1 client->server MAC algorithm
Initialised AES-256 server->client encryption
Initialised HMAC-SHA1 server->client MAC algorithm
Using username "abc".
Sent password
Access granted
Opened channel for session
Started a shell/command
Sent EOF message
arowana66
Gerbil In Training
 
Posts: 2
Joined: Thu Jul 09, 2009 7:54 am

Re: PSFTP Scripting problem

Postposted on Thu Jul 09, 2009 3:23 pm

We need to see the script, too.
The best things in life are free.
http://www.gentoo.org
Guy 1: Surely, you will fold with me.
Guy 2: Alright, but don't call me Shirley.
titan
Grand Gerbil Poohbah
 
Posts: 3276
Joined: Mon Feb 18, 2002 7:00 pm
Location: Great Smoky Mountains

Re: PSFTP Scripting problem

Postposted on Fri Jul 10, 2009 4:58 am

Hi titan,

is a command line i issue on the dos srceen as show below.

c:\>sftp -2 -v abc@111.111.11.11 -pw mytext -b CHKCONNECT.txt 1> log.txt
arowana66
Gerbil In Training
 
Posts: 2
Joined: Thu Jul 09, 2009 7:54 am


Return to Developer's Den

Who is online

Users browsing this forum: No registered users and 4 guests