Sysax Product Forums / Sysax Multi Server / Bugs and Feature Requests / ssh to execute a command file on the remote server fails
Posted:  16 Jul 2014 14:31
Hi,

We were doing a sFTP from an Unix server to a Windows server and also a ssh, from the Unix server to the Windows server, to execute a file present on the Windows server: these 2 steps worked well.

Now, we are changing the sFTP tool to Sysax and we have issues with the ssh part: below is a resume of the old/new setup and of what works/no longer works: i hope you will be able to help me.

- sFTP tool: Sysax
- Passwordless connexion through sFTP: => OK
- Transfer of files through sFTP => OK

- ssh connexion from the Unix server to the Windows server to execute a file on the Windows server => KO, this no longer works (and it worked with the previous sFTP tool).

The command used for this ssh is the following => ssh windows_server_name file_name_of_remote_server_to_execute param1 param2 param3

For this last point, if i execute exactly the command above, the ssh seems to wait for a response for several minutes and then the connexion is ended by the remote server without doing anything
I have tried to execute the same commande with the -v option to have debug info but i have not a lot of helpful info:

debug1: Sending command: CGO_PAYFLEX_MOVE_FILES.sh OTL/EBSCNV 140704_123044 ONT_031188_031188_OTL_XTRNL.DAT ONT_031189_031189_OT    L_XTRNL.DAT
debug1: channel request 0: exec
debug1: channel 0: open confirm rwindow 0 rmax 32768
debug1: channel_free: channel 0: client-session, nchannels 1
Connection to budmflex2 closed by remote host.

So here are all the other tests i did:
1) connect 1st to the Windows server through the ssh command and then, in a 2nd time, execute the commande file on the Payflex server => OK, it works
2) Execute the ssh command above with the "bash" option => always fails (i made a couple of tests)
3) modify my script shell that is executed on the Unix server to replace the ssh command that includes the file command argument by this:

ssh -t Windows_server_name << EOF
echo 'Hello'
EOF

Doing this, if i execute my shell on the Unix server, i get the following error => Pseudo-terminal will not be allocated because stdin is not a terminal

After somme researches on internet, i try to do pass the "-t" option twice like it is sometime suggested but in this case, i have the following error => tcgetattr: Inappropriate ioctl for device
Connection to budmflex2 closed.

Any idea ? Some help would be greatly appreciated.

Thanks,

Hervé
Posted:  18 Jul 2014 16:04
Hi Herve,

The Sysax development team would like to help you debug this issue.

Please open a Sysax support ticket so that they can begin to work with you.

https://www.sysax.com/support/

Regards,
Sysax support
 

Copyright © 2021 Codeorigin, LLC - All Rights Reserved.
XML RSS 2.0 XML Atom 1.0