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 -

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 -

=====================================================> 100% 42.2MB 

But is currently coming as -

 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

wget can tell whether it's running inside a terminal or not, and adjusts its output accordingly. The ............... syntax is more appropriate for logfiles, so that's what it uses when it detects no terminal.

to force your session to have a terminal even though it's not interactive, ssh -t.

1 Like

@Corona688,

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 :smiley:

Anyway, thanks once again.

Cheers,
Morgan.