Pragma Systems Technical Forum

Executing Cygwin command from FortressSSH

https://forums.pragmasys.com/Topic284.aspx

By Swaminathan - 1/1/2015 10:27:51 PM

We want the cygwin bash shell while getting connected using Fortress SSH. So we installed Cygwin 1.7 and Fortress SSH Server on the windows 2012 R2 server.
- Configured the Console Settings in the Local Server Configuration to get the Cygwin bash shell as per http://www.pragmasys.com/products/support/cygwin-config

When we pass the cygwin command ("uname -a") from ssh like the below, it is NOT taking the operand value (i.e -a) and it takes only "uname"

[root@pserv0028 ~]# ssh  1administrator@wrkbnch212-03 "uname -a"
1administrator@wrkbnch212-03's password:
CYGWIN_NT-6.3-WOW64

where as, if I ssh first and then entered the cygwin command then getting the correct output. see below...

[root@pserv0028 ~]#  ssh  1administrator@wrkbnch212-03
1administrator@wrkbnch212-03's password:
1Administrator@wrkbnch212-03 ~
$ uname -a
CYGWIN_NT-6.3-WOW64 wrkbnch212-03 1.7.32(0.274/5/3) 2014-08-13 23:03 i686 Cygwin

Any idea, why the operand value is not taken if I pass the command directly thru ssh?

Regards
Swami
By bethredd - 1/2/2015 3:01:29 AM

Hello,

The settings under the NonInteractive Command Settings are used for commands passed as a parameter to the ssh command. Please configure the Shell Spec as the bash shell with full path and command line parameters to run the bash shell correctly.
By Swaminathan - 1/12/2015 7:25:25 PM

Hi,

Thanks a lot for your response.
This is what we are having under "NonInteractive Command Settings". But still, commands passed as a parameter to the ssh command is NOT working.

Execution Mode: Full Stream
Shell Spec: c:\cygwin\bin\bash --login -c
Suppress Input Pipe: De-Selected.

Is there any other setting we are missing here?

Regards
Swami
By bethredd - 1/13/2015 4:51:10 AM

There was a recent fix for the NonInteractive Command Shell Spec settings. Please download the latest build at www.pragmasys.com/ssh-server/download. You should be able to install the update directly over your existing installation, but please compare your build number with the notes at the top of the download page to make sure.