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