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?

  • while using wget I get teh following error. wget username:password@sitename.com/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) –  Oct 29 '09 at 07:32

4 Answers4

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
Josh
  • 9,190
  • 28
  • 80
  • 128
  • httpS is http over SSL, nothing to do with SSH – drAlberT Oct 28 '09 at 15:41
  • 1
    @AlberT: What's your point? – womble Oct 28 '09 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 '09 at 15:55
3

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

Aaron Brown
  • 1,697
  • 1
  • 12
  • 22
0

wget is probably the easiest:

$ wget http://your.url.here/
ktower
  • 1,171
  • 10
  • 15
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

dyasny
  • 18,802
  • 6
  • 49
  • 64