Hi

My SSH Version - OpenSSH_3.8.1p1, OpenSSL 0.9.7d 17 Mar 2004.

I am trying to rename a file in windows by sending the rename command
from a unix machine through ssh.  However, I am not able to rename the
file.  If I use / in the command it gives syntax error.  And if I use \
without quotes, its ignored and if I use \ with double quotes it adds
one more \ to the command.

Can anyone help me with the proper syntax to send the rename command ?
Thanks.


And following is my command and the verbose log.


$ ssh -i /mrs/home/mrsop/.ssh/zmis_rsa -v [EMAIL PROTECTED] cmd /C rename
C:/ssh/first.txt second.txt


========================================================================
==========================================
OpenSSH_3.8.1p1, OpenSSL 0.9.7d 17 Mar 2004
debug1: Reading configuration data /usr/local/openssh/etc/ssh_config
debug1: Connecting to windowsbox [windowsboxip] port 22.
debug1: Connection established.
debug1: identity file /mrs/home/mrsop/.ssh/zmis_rsa type 1
debug1: Remote protocol version 2.0, remote software version 5.1.3.8 SSH
Tectia Server
debug1: no match: 5.1.3.8 SSH Tectia Server
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.8.1p1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Host 'windowsboxip' is known and matches the RSA host key.
debug1: Found key in /mrs/home/mrsop/.ssh/known_hosts:8
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue:
gssapi-with-mic,password,publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key: /mrs/home/mrsop/.ssh/zmis_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 149
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending command: cmd /C rename C:/ssh/first.txt second.txt
The syntax of the command is incorrect.
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.5 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status
1=======================================================================
===========================================

Regards
Sankar.
This email is confidential. If you are not the addressee tell the sender 
immediately and destroy this email without using, sending or storing it. Emails 
are not secure and may suffer errors, viruses, delay, interception and 
amendment. Standard Chartered PLC and subsidiaries ("SCGroup") do not accept 
liability for damage caused by this email and may monitor email traffic.

Reply via email to