tail -f using PuTTY hangs

17,287

Try to use a saved session where you set the Option "Keepalive". The use the session like this:

putty -ssh -t -pw -m tail-exec -load 'session-name'
Share:
17,287
Jakub Vala
Author by

Jakub Vala

Updated on June 04, 2022

Comments

  • Jakub Vala
    Jakub Vala almost 2 years

    I am using PuTTY command line to connect to a server and tail a log file. On local machine I've created a file "tail-exec" which contains following text:

    tail -f /var/log/test.log

    I am starting putty through command line as:

    putty -ssh -t -pw -m tail-exec user@server

    This opens up the terminal window with log tail. But the problem is that this terminal hangs after there are few hundred lines added to the log.

    If I open putty manually, and then run the tail command from the bash prompt, then it is not hanging for thousands of lines also.

    I've tried using following text in tail-exec file, but same issue is happening:

    bash -i tail -f /var/log/test.log

    Any idea what could be the issue?