Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Remote SSH Commands
#1

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?

Reply


Messages In This Thread
Remote SSH Commands - by rookiebeotch - 2010-10-25, 07:35 PM
Remote SSH Commands - by hybrid - 2010-10-26, 05:04 AM
Remote SSH Commands - by Dungeon-Dave - 2010-10-26, 08:45 AM
Remote SSH Commands - by rookiebeotch - 2010-11-02, 12:09 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)