Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My webserver networking is down. I can open a shell over SSH using serial port.

I need to download 2 files (an sql dump and a backup of the entire website: aprox 3GB).

To open the shell I must to follow these steps:

  1. open an SSH connection to a server: ssh <host> -l<user>
  2. enter password
  3. then I must to log again (this time to my server), enter my username
  4. and my password
  5. now I have a shell to my server

How can I transfer files to my local machine? Remember, the server has no internet access

console dump:

Pedro@MyMachine:~$ ssh <server address> -l<user>
Trying ***.***.***.***...
Escape character is '^]'.
CentOS release 5.4 (Final)
Kernel on an x86_64

<server address> login: root
Last login: Wed Mar 10 23:02:10 on ttyS0
[root@s15315044 ~]# 

lrzsz not available


My server is up :) So I don't need this anymore, but it would be great to know if someone has a solution to this problem

share|improve this question
3GB?! Good lord, do you know how long that will take to download over a serial connection? If you manage to get 57600 bps you would be looking at about 150 hours. Are you sure you can't find a USB disk or something? – Zoredache Mar 10 '10 at 22:21
Oh, and it isn't clear to me where you are making a serial connection based on your description. – Zoredache Mar 10 '10 at 22:26
How on earth does a webserver have no Internet connection? How does it serve the website to the Internet? – Andy Shellam Mar 10 '10 at 22:28
My server is located in Germany. I'm from Spain. The serial port connection is an emergency connection to access the server when the network is down. I need to get at least my databases (40MB). My host (1&1) seems to have routing problems and they give me no solution. Now it's the 3rd day of downtime. – Peter Mar 10 '10 at 22:30
How exactly do you access this emergency connection once you are connected via SSH? What client are you using for SSH? Is lrzsz installed on your server? – Zoredache Mar 10 '10 at 22:54
up vote 2 down vote accepted

It sounds like your SSHing into a serial server first and then interacting with your machine (?)

If that's the case, and if you absolutely MUST do this / can deal with the insanely slow speeds as have been mentioned in the comments:

  1. Run script or similar to capture output
  2. Perform whatever gyrations you must in order to connect to your server
    (Steps 1-5 in your question)
  3. uuencode input_filename output_filename
    (for practical purposes input & output filenames can/should be the same & uudecode will spit its output to stdout).
  4. Disconnect from your server
  5. Exit the script output file & grab the uuencoded version of your file
  6. Feed the uuencoded data through uudecode to get your original file back.

Check out man uuencode & man uudecode for more details.

share|improve this answer

How about using zmodem (sz and rz) - those work over a serial port.

share|improve this answer
IIRC will neatly wrap a zmodem listener around an interactive ssh session. You can zssh as as described, then sz the files on the remote end, and they'll be efficently transfered to the local machine. zmodem brings me back to my bbs days .... – Jason Mar 10 '10 at 23:24
zmodem not available – Peter Mar 10 '10 at 23:27

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.