• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 424
  • Last Modified:

Expect script work locally but not when called remotely via SSH

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
CRC64
Asked:
CRC64
  • 3
  • 2
1 Solution
 
GaryCommented:
Its saying there is no file or directory called autosave_list
Is there?
0
 
CRC64Author Commented:
Here there is.  

The script works locally perfectly ...

The error about the file is only when launched remotely
0
 
GaryCommented:
Confused. Are you trying to run this script on a remote server or trying to run it from a remote server
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
CRC64Author Commented:
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
 
woolmilkporcCommented:
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
 
CRC64Author Commented:
Yes, that was the problem. Thank you !!!
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now