Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Problem: I'm currently using PuTTY for SSHing into our server from a Windows machine but, because its output buffer is limited, when I have a large (few hundred screens' worth) amount of data sent from the server the top part is lost. Logging doesn't really cut the mustard either because it's such a faff to find the log file and mess about with it.

Question: Is there anything out there which buffers the entire session or at least allows me to dynamically increase the buffer by a few MB (whilst in the session)?

Suggestions are very welcome. Perhaps there is a front end program which you have used that gives this functionality?

-Please be gentle, this is my first question. Thank you in advance!

share|improve this question

migrated from Feb 17 '10 at 12:32

This question came from our site for professional and enthusiast programmers.

Unfortunately, you have asked it in the wrong place. This site is for programming questions. – nb2580 Feb 17 '10 at 12:24
Why not just increase the buffer in Putty? – ChristopheD Feb 17 '10 at 12:32
or use session logging so everything is stored in a log file – Snark Feb 17 '10 at 12:36
@Neil - thanks for the migration! @ChristopheD - that's a good suggestion, but it can't be done retrospectively and it's still a limit (even at 2000 lines!). I was hoping for infinite scrolling. – user28562 Feb 17 '10 at 12:53
up vote 4 down vote accepted

Granted, this is not the most robust solution, however in PuTTY you can configure the number of lines of scrollback to be saved. Setting this to an extremely high value, say 2147483647 (the maximum value possible), could help you out. You would in effect have the biggest screen buffer PuTTY could give you. Also, mid-session you can change this value by accessing the system menu and selecting "Change Settings."

share|improve this answer
I didn't know that was possible - thanks! Sometimes it's the obvious things that pass us by. Your pearl is much appreciated. – user28562 Feb 19 '10 at 14:27

Just turn logging on and have it dumped to a text file.

share|improve this answer
I normally need the output mid-session and it's a nuisance to locate and mess about with the log file. I'm looking for the functionality to be incorporated within the client. – user28562 Feb 17 '10 at 13:07

I'd suggest using screen on the remote side. It allows you to specify how much scroll buffer to save (see here) and a lot of other useful amenities.

Furthermore, it's client-independent: if you'll have to log in tomorrow from another computer, not only you can leave your sessions open, but also it will keep your preferences.

It's generally a life-saver.

Another nice tool is tmux; similar functionalities, more goodies, etc. Not sure it can be applied to your scenario, though.

share|improve this answer
I'm looking for more of a client based solution for this question, but I'll be sure to check out screen. Cheers – user28562 Feb 17 '10 at 12:58

Still not a client based solution, as with the others listed, but another option is script which logs an entire session. See man script for more information (or some online copy of the man page like here).

You could combine this with less running in another SSH clietn window (or another window in a screen session). If you do something like mkfifo /tmp/scriptpipe; script -f /tmp/scriptpipe you can view this using something like cat /tmp/scriptpipe | less - the less tool will let you scroll back and forth as needed. The extra advantage of this is that you can keep the view scrolled back while typing new commands into the active session (useful for doing new work referring to commands+output from some time ago).

I recommend using screen in conjunction with this, either with both the active session and less in separate windows of the screen session or each in a separate screen session in separate clients - this means you can reconnect easily, losing no work/output, if you suffer a connection drop mid-session.

If you want to record the session to file as well as sending a copy through the pipe to less, do something like cat /tmp/scriptpipe | tee /file/to/save/sessionlog/to | less.

share|improve this answer

I use a value of 99 999 lines for the backscroll and never had any problem. Of course, this will consume memory like hell, but with today's PC, this should not be an issue.

share|improve this answer

Whenever you think you're going to be running a large command and need all the output type it like this:

command > logfile.txt

Then you can cat or retrieve the file to your local machine to view.

share|improve this answer

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.