LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (http://www.linuxquestions.org/questions/red-hat-31/)
-   -   Small doubt for using wget cia SSH!!! (http://www.linuxquestions.org/questions/red-hat-31/small-doubt-for-using-wget-cia-ssh-907445/)

rockf1bull 10-10-2011 02:17 PM

Small doubt for using wget cia SSH!!!
 
Hi Guys,

I have just ran into a small problem where I am trying to ssh to another server and the script does a wget on that server. Following is the syntax I am using though it's not working as expected.

A normall wget on the local system simply shows the verbose output in one horizontal line though here it seems to be braking it down per 50KB though it does work fine in the end.

What I am looking for is to have a argument in the script for wget or ssh (like ssh -l or ssh -t etc..) so that it works just like normal even when I invoke it with a script.

Command -
PHP Code:

ssh user@server1.com "sh /home/user/abc/test.sh http://download-server.com:8085/folder/tgv/mime/types/something.tar something" 

THe output should come something like -

PHP Code:

=====================================================> 10042.2MB 


But is currently coming as -

PHP Code:

 25300K .......... .......... .......... .......... .......... 71%  151M 0s
 25350K 
.......... .......... .......... .......... .......... 71%  135M 0s
 25400K 
.......... .......... .......... .......... .......... 72%  111M 0s
 35200K 
.......... .......... .......... .......... .......... 99%  315M 0s 


Please let me know if there is any argument to counter this in ssh or wget.


Cheers,
Morgan

colucix 10-10-2011 02:26 PM

Have you tried ssh -t? It forces pseudo-terminal allocation, so that it should act exactly as you had logged into the remote machine.

rockf1bull 10-11-2011 12:06 AM

@colucix

Thank you very much and ssh -t did the trick for me. It's working as expected. You won't believe it, but strangely I had tried it before and somehow it didn't work and now it does :D

Anyway, thanks once again.

Cheers,
Morgan.


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