2

How to download a file from a location in internet to RHEL5 server running at runlevel 3 (without GUI)?

Like, can we use sftp to directly download files from a website?

Or, do we have any commands for downloading a file from an address like https://sitename.com/location to RHEL5 server?

1
  • while using wget I get teh following error. wget username:[email protected]/location Resolving sitename.com/location... xx.xxx.xx.xx Connecting to sitename.com/location|xx.xxx.xx.xx|:443... connected. HTTP request sent, awaiting response... 403 Forbidden 03:20:51 ERROR 403: Forbidden. (Note that a uname and pword is required for login and I gave it in the command line)
    – A.A Philip
    Oct 29, 2009 at 7:32

4 Answers 4

5

I would suggest using wget. In a shell on the server (possibly via SSH) execute:

wget https://sitename.com/location

wget should be installed by default, if not, you can install it with:

yum install wget
3
  • httpS is http over SSL, nothing to do with SSH
    – drAlberT
    Oct 28, 2009 at 15:41
  • 1
    @AlberT: What's your point?
    – womble
    Oct 28, 2009 at 15:47
  • 1
    @AlberT, I understand that https has nothing to do with SSH. But if this is a server without a GUI, it's possible that it doesn't have a terminal at all, in which case to execute commands you need to SSH in. The poster didn't make it clear how he is accessing the server.
    – Josh
    Oct 28, 2009 at 15:55
3

wget, curl, ncftp, elinks, and lynx will all accomplish what you want to do.

0

wget is probably the easiest:

$ wget http://your.url.here/
0

wget was already mentioned, so another way is to actually browse to the website using one of the text mode browsers - links or lynx

You must log in to answer this question.