This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Error while using SSH command

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a shell script which does SSH to a remote machine to execute the perl script.
the command is something like this $SSH -x "node"  "/perl/bin/perl -I/perl/lib  <perlfilename>.pl <args..> " which fails with an error 2.
I looked at the file and perl library version it looks fine. The SSH error suggest it failed to connect to remote machine , whereas similar SSH command to execute a binary in the remote machine works fine.
Is there any way that could be debugged further
 
Saloon Keeper
Posts: 28320
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch, Likith!

My guess is that the command line parser isn't seeing the target hostname properly. I am assuming that node is your target host.

Actually, there ought to be an actual failure message on stderr, not just an error code, and I'd like to see that.

But my suspicions are that possibly quoting the note is making trouble. Other options are that there is no machine named node on the network or that the ability of your machine to resolve the network machine named node is ineffective.

Some possible solutions include targeting more specifically such as by using the fully-qualified domain name (FQDN) - for example node.coderanch.com. Another option is to use the IP address of node and thereby bypass whatever name resolution problems you might be having.
 
Likith Shekar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Tim !!
As you guided I redirected the stderr and also increased the trace level of SSH by using -vvv and found that issue was with perl script.
I have added few more debug statement to point out the actual error in perl script.
 
Liar, liar, pants on fire! refreshing plug:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic