LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-04-2007, 01:48 PM   #1
rebeldevel
LQ Newbie
 
Registered: Jul 2007
Location: Brazil
Distribution: Slackware
Posts: 2

Rep: Reputation: 0
Question Problem with lynx via SSH


Folks,

I created a script that retrieves a result from a specific website. This site requires authentication, so I am using lynx with its scripting funcionality (cmd_log / cmd_script parameters). The Lynx automated script itself saves the result page into a file, so it's not necessary to use dump or any sort of redirection of standard output to a file.

Here is the main line:

lynx -cmd_script=/path/thescript.lynx theurl 1>> /dev/null

The script works fine. But when I run the script through another server via SSH (ssh -x -q user@server "/path/script.sh") the script hangs in the lynx line. Something is wrong with the lynx automation... I tried to use -dump, it worked fine (it dumped the authentication page, of course).

Any clue?

Last edited by rebeldevel; 07-04-2007 at 01:50 PM.
 
Old 07-04-2007, 02:24 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Does the script exist on the remote server?

If so, you might try opening an ssh session on the remote server and executing the script directly.

Also, remove the "-q" option so you can see if ssh is responding with information on a problem.

Last edited by jschiwal; 07-04-2007 at 02:26 PM.
 
Old 07-04-2007, 02:36 PM   #3
rebeldevel
LQ Newbie
 
Registered: Jul 2007
Location: Brazil
Distribution: Slackware
Posts: 2

Original Poster
Rep: Reputation: 0
I thought: "Humm, it must be something related to the standard input".

This is the stupidest workaround EVER. It worked!

echo "" | lynx -cmd_script=/path/thescript.lynx theurl 1>> /dev/null
 
Old 07-04-2007, 07:33 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Why do you use >>/dev/null instead of >/dev/null. That might cause a hang.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH problem - ssh-add not respond FerkoPica Linux - Security 6 05-07-2006 03:47 PM
where to download SSH and Lynx source files mitchb Linux - Newbie 1 06-23-2004 04:48 AM
Solved Lynx - pppd problem bhooder Linux - Newbie 2 02-25-2004 02:38 PM
lynx problem 1 and 2 ashesh Linux - General 1 07-18-2003 05:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration