2010-10-25, 07:35 PM
I am trying to remotely call a script file via ssh.
the server has a shell that is a custom program, lets call it shelly. There is also a script file on the server that needs to run when in shelly.
i can run the following after i ssh into the box, as root.
Code:
exec /usr/local/bin/shelly < /my_folder/custom_script
that works fine.
I need to be able to embed this in ssh. I have done so like this. I have shared keys so no password needed, and it works.
Code:
ssh user@server "exec /usr/local/bin/shelly < /my_folder/custom_script"
when i run this ssh command from my remote machine the commands are not executed from the script. So i run ssh in debug mode, and after a successful authentication i get a line that says:
Code:
Ssh2channelSession/SSHCHSESSION.C : bad data
and the connection begins to quit/close.
I don't understand what "Bad Data" error means, and i do not have this SSHCHSESSION.C file on my server.
Is Bad Data mean there is something wrong with the command? or is it a permissions problem on the server?
Any Ideas?