The problem appears to be one of command line length.
The command got truncated exactly 255 characters from
the beginning of the command. That used to be a DOS
restriction. I Googled "command line length windows xp"
and found that the command line can be 2047 or 8191 for
Win2000 and WinXP respectively. This would seem to
contradict my thought that it is a command line length
restriction. The reason I would still hold to the fact
there is a limit to the command line is that it is such
a distinctive length, 255 characters. I also found a
reference to the command line length being restricted for
particular commands in the CMD window/shell.
Do you start your command window with CMD? or command?
CMD is the command shell with the longer command lines.
Maybe that will solve your problem.
Another thought I had was could you wrap the remote
command in a script file and run that remotely. If it
is a command that is always the same you could scp it
to the remote machine and then just call it like you
were trying to call the huge long command line. If it
is not a "static" command then you could in theory do
a similar thing by way of a batch file on the local
machine. It would go something like:
Create a batch file
scp batch file to remote machine
call batch file using ssh command
call del of batch file using ssh command
Just my thoughts
Stephen
Stephen A. Herr
-----Original Message-----
From: ssh@erdelynet.com [mailto:ssh@erdelynet.com] On Behalf Of
ext-Vamsi.Pendela@nokia.com
Sent: Tuesday, November 14, 2006 0139
To: ssh@erdelynet.com
Subject: RE: ssh in openssh truncates the command line
Can you elaborate bit of what you mean by "executing the command
directly under cygwin"?
I did not install the Cygwin in my machine.
I want to use the SSH connection for one of my Ant tasks. There I faced
this problem of the command execution remotely on windows as explained.
The version of OpenSSH for Windows is v3.8.1p1-1
-----Original Message-----
From: ssh@erdelynet.com [mailto:ssh@erdelynet.com] On Behalf Of ext
Chris Rapier
Sent: 13 November, 2006 18:38
To: ssh@erdelynet.com
Subject: Re: ssh in openssh truncates the command line
Have you tried executing that command directly under cygwin on that
machine?
Also, what version of OpenSSH for Windows are you using?
ext-Vamsi.Pendela@nokia.com wrote:
> Hi,
>
> I'm using the SSH connection during my project.
>
> As part of the porting to windows, I took the use of OpenSSH for
Windows.
>
> Then when I executed the command remotely using ssh, the command is
been
>
> truncated. See the clip below:
>
> -----Clip-----
>
> C:\APPS\unix\bin>ssh root@127.0.0.1 "'c:/program
> files/openssh/bin/sh.exe' c:/echo.sh
>
01234567-101234567-201234567-301234567-401234567-501234567-601234567-701
234567-801234567-90123456-100123456-110123456-120123456-130123456-140123
456-150123456-160123456-170123456-180123456-190123456-200123456-21012345
6-220123456-230123456-240123456-25"
>
> ****USAGE WARNING****
>
> This is a private computer system. This computer system, including all
>
> related equipment, networks, and network devices (specifically
including
>
> Internet access) are provided only for authorized use. This computer
system
>
> may be monitored for all lawful purposes, including to ensure that its
use
>
> is authorized, for management of the system, to facilitate protection
> against
>
> unauthorized access, and to verify security procedures, survivability,
and
>
> operational security. Monitoring includes active attacks by authorized
> entities
>
> to test or verify the security of this system. During monitoring,
> information
>
> may be examined, recorded, copied and used for authorized purposes.
All
>
> information, including personal information, placed or sent over this
system
>
> may be monitored.
>
> Use of this computer system, authorized or unauthorized, constitutes
consent
>
> to monitoring of this system. Unauthorized use may subject you to
criminal
>
> prosecution. Evidence of unauthorized use collected during monitoring
may be
>
> used for administrative, criminal, or other adverse action. Use of
this
> system
>
> constitutes consent to monitoring for these purposes.
>
>
> root@127.0.0.1's password:
>
> echo.sh
>
01234567-101234567-201234567-301234567-401234567-501234567-601234567-701
234567-801234567-90123456-100123456-110123456-120123456-130123456-140123
456-150123456-160123456-170123456-180123456-1
>
> C:\APPS\unix\bin>more \echo.sh
>
> echo `basename $0` $*
>
> C:\APPS\unix\bin>
>
> -----Clip-----
>
> See the colored output above.
>
> For some reason, there is a limitation on the length of the command
that
> ssh in
>
> OpenSSH takes care of. This problem is not seen with linux built-in
ssh.
>
> Can anyone knows any solution how to get rid of this or faced such
> situation?
>
> Is it a bug or am I doing some mistake?
>
> Thanks and Best Regards,
>
> - Vamsi.
>
-- List Info: http://erdelynet.com/ssh-l/ List Archives: http://erdelynet.com/archive/ssh-l/ To Unsubscribe: Mail mailto:ssh+unsubscribe@erdelynet.com -- List Info: http://erdelynet.com/ssh-l/ List Archives: http://erdelynet.com/archive/ssh-l/ To Unsubscribe: Mail mailto:ssh+unsubscribe@erdelynet.com -- List Info: http://erdelynet.com/ssh-l/ List Archives: http://erdelynet.com/archive/ssh-l/ To Unsubscribe: Mail mailto:ssh+unsubscribe@erdelynet.comReceived on Wed Nov 15 15:06:43 2006
This archive was generated by hypermail 2.1.8 : Wed Nov 15 2006 - 15:06:44 EST