Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Node.JS The system cannot find the path specified

karthiga

New Coder
JavaScript:
const jqcmd_reboot = `jq '.method[0].provider.arguments = ["/home/azureuser/reboot_agent.py", '${ip.join("', '")}' ]' /home/azureuser/reboot_agent.json > /home/azureuser/reboot_agents.json`;

Code:
Error in SSH command execution: Error: Command failed: jq '.method[0].provider.arguments = ["/home/azureuser/reboot_agent.py",
'ip' ]' /home/azureuser/reboot_agent.json > /home/azureuser/reboot_agents.json  
The system cannot find the path specified.
 
Last edited by a moderator:
Hi there,
All I can say is that the error is telling you that the path you specified doesn't exist.

I can't tell you any more than this with the information that you've provided.
Please show more of your relevant code, explain what you're trying to do, then I may be able to help you better.

Please read How do I ask a good question? for more information on how to format your question and what information to include.
 
Hello,

I need to take ssh from windows to ubuntu machine after that i need to add the ip address in the json.temp file.I have successfully established an SSH connection from my Windows machine to an Ubuntu server. However, I encountered an issue when attempting to execute a jq command on the Ubuntu machine, resulting in the following error:

JSON:
{
  "error": "Failed to execute SSH command",
  "details": "Command failed: ssh -i /root/.ssh/id_rsa -o StrictHostKeyChecking=no [email protected] jq '.method[0].provider.arguments = [\"/home/azureuser/reboot_agent.py\", '192.168.13.130', '192.168.12.53', '192.168.10.82' ]' /home/azureuser/reboot_agent.json > /home/azureuser/reboot_agent.json.temp\nThe system cannot find the path specified.\r\n"
}

Both /home/azureuser/reboot_agent.py and /home/azureuser/reboot_agent.json files are present in the specified path on the Ubuntu machine. Could you please provide guidance on resolving this issue?

code snippet:
JavaScript:
const cdcmd = `ssh -i ${privateKeyPath} -o StrictHostKeyChecking=no azureuser@${sshHost} "mkdir -p ${directoryPath}"`;
const jqcmd_reboot = ` ssh -i ${privateKeyPath} -o StrictHostKeyChecking=no azureuser@${sshHost} jq '.method[0].provider.arguments = ["/home/azureuser/reboot_agent.py", '${ip.join("', '")}' ]' /home/azureuser/reboot_agent.json > /home/azureuser/reboot_agent.json.temp`;

Thank you
 
Last edited by a moderator:
Code:
Error in SSH command execution: Error: Command failed: jq '.method[0].provider.arguments = ["/home/azureuser/reboot_agent.py",
'ip' ]' /home/azureuser/reboot_agent.json > /home/azureuser/reboot_agents.json 
The system cannot find the path specified.
Are /home/azureuser/reboot_agent.json and /home/azureuser/reboot_agents.json supposed to be the same file?
 
But are the file names supposed to be the same? Like you mistyped an s?

I've never used a jq command, so I have no idea what that command is supposed to do.
 

New Threads

Buy us a coffee!

Back
Top Bottom