Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

Expect script work locally but not when called remotely via SSH

Posted on 2013-05-12
6
Medium Priority
?
423 Views
Last Modified: 2013-05-12
My expect script expect-script.txt.txt  runs fine when launched locally, but when I launch it from a remote server I get errors suggesting that the paths of the files are invalid. expect-error.txt.

I am clueless as what needs to be added to make this work ...

Thanks in advance for your help.
0
Comment
Question by:CRC64
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39159748
Its saying there is no file or directory called autosave_list
Is there?
0
 

Author Comment

by:CRC64
ID: 39159755
Here there is.  

The script works locally perfectly ...

The error about the file is only when launched remotely
0
 
LVL 58

Expert Comment

by:Gary
ID: 39159757
Confused. Are you trying to run this script on a remote server or trying to run it from a remote server
0
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 

Author Comment

by:CRC64
ID: 39159767
Sorry. The script is on server A and I am try to run it FROM server B.

 While on server B I am doing:  ssh username@serverA <full_path_of_expect_file>

The script works correctly when run on server A
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 2000 total points
ID: 39159795
Specify the full path to autosave_list.

Seems that this file is not in the HOME directory of "username" which is set by ssh as the "current" directory.

This hasn't anything  to do with the PATH variable nor with the directory where the expect script itself is located.
0
 

Author Closing Comment

by:CRC64
ID: 39159919
Yes, that was the problem. Thank you !!!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the years I've spent many an hour playing on hardened, DMZ'd servers, with only a sub-set of the usual GNU toy's to keep me company; frequently I've needed to save and send log or data extracts from these server back to my PC, or to others, and…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

648 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question