Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
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) –  A.A Philip Oct 29 '09 at 7:32
add comment

4 Answers

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
share|improve this answer
    
httpS is http over SSL, nothing to do with SSH –  AlberT 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
add comment

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

share|improve this answer
add comment

wget is probably the easiest:

$ wget http://your.url.here/
share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.