Python Forum
unable to run unix command using spur
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
unable to run unix command using spur
#9
hi All,

I am getting same error.

import spur
import spur.ssh

try:
	shell = spur.SshShell(hostname="EDQDVTAPP01.XXXXX.com",port=22,username="applogs",password="XXXXX",missing_host_key=spur.ssh.MissingHostKey.accept)
	with shell:
		result = shell.run(["ls"])
		print (result)
except spur.ssh.ConnectionError as error:
	print (error.original_traceback)
	raise
	
Error:
Traceback (most recent call last): File "unix_server_test.py", line 25, in <module> result = shell.run(["ls"]) File "C:\Users\pubhatia\AppData\Local\Programs\Python\Python36\lib\site-packages\spur\ssh.py", line 166, in run return self.spawn(*args, **kwargs).wait_for_result() File "C:\Users\pubhatia\AppData\Local\Programs\Python\Python36\lib\site-packages\spur\ssh.py", line 206, in spawn raise NoSuchCommandError(command[0]) spur.errors.NoSuchCommandError: Command not found: ls. Check that ls is installed and on $PATH
Reply


Messages In This Thread
unable to run unix command using spur - by purnima1 - Sep-04-2018, 01:43 PM
RE: unable to run unix command using spur - by purnima1 - Sep-05-2018, 07:16 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  pyspark sql unable to recognize SQL query command cpatte7372 6 16,761 Jul-31-2018, 04:17 PM
Last Post: micseydel
  How to run unix command in python soubalaji 1 3,256 Jan-11-2018, 07:16 AM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020