I am trying to remote execute a python command vis ssh. I am getting a syntax error from the remote server.
[root@fuel ~]# echo "glance-control all status" | ssh root@10.11.32.16 /usr/bin/python
Warning: Permanently added '10.11.32.16' (RSA) to the list of known hosts. File "<stdin>", line 1 glance-control all status ^ SyntaxError: invalid syntax[/SIZE][/FONT] [root@fuel ~]# I have done many searches, and have tried altering syntax. I always get the same error. Any help would be appreciated. |
What is the output if you ssh into the computer first, and then run:
Code:
echo "glance-control all status" | /usr/bin/python |
The correct syntax to run a remote command via ssh is:
ssh root@10.11.32.16 '/usr/bin/python glance-control all status' |
Quote:
Code:
ssh root@10.11.32.16 '/usr/bin/python -c "glance-control all status"' |
True and we probably need more information. From a quick google, glance is a HP-UX monitoring tool similar to nagios and glance-control is the command line access tool. So I believe the op is trying to run a remote command.
|
Quote:
root@node-29:~# echo "glance-control all status" | /usr/bin/python File "<stdin>", line 1 glance-control all status ^ SyntaxError: invalid syntax |
Quote:
# ssh root@10.11.32.16 '/usr/bin/python -c "glance-control all status"' Warning: Permanently added '10.11.32.16' (RSA) to the list of known hosts. File "<string>", line 1 glance-control all status ^ SyntaxError: invalid syntax |
michaelk is correct, in that more information is needed.
1) glance is a piece of openstack. 2) glance-control is a tool to handle bringing up and down the glance daemons. By itself, glance-control works. e.g. root@node-29:~# glance-control all status glance-api is stopped glance-registry is stopped glance-scrubber is stopped The problem is trying to get glance-control to work via ssh. Here is the original error, which I did not post Quote:
I believe this is a SSH syntax error. Well, while writing this reply, I solved this problem. I went through the ssh man page again and added the -t option to the ssh command. Quote:
Thanks for all who replied. |
All times are GMT -5. The time now is 09:33 AM. |