I would like to keep checking a log file(named myapp.log) located on a remote web server & keep the up-to-date content of this file showing to me (by using the linux command
tail -f myapp.log). The name of the remote web server is service
This remote web server can only be accessed through other 2 remote servers (named Alpha & Beta). So, I have to establish several SSH connections in order to access the remote service server. like below:
Step 1, SSH to Alpha server:
ssh firstname.lastname@example.org (password is required)
(Now, I'm on Alpha server)
Step 2, SSH to Beta server through Alpha:
ssh beta.server.org (password is required)
(Now, I am on Beta)
Step 3, SSH to service server through Beta:
sudo ssh service (password is required)
(Now, I am on Service server)
Step 4, open my server log file:
tail -f myapp.log
Every time, I have to execute the above commands on terminal in order to access myapp.log file. The most boring part is the connection only keep alive for 20min, then I have to run those commands again to access the myapp.log file.
Is there a way that I could keep the connections alive all the time, that I can see the myapp.log content all the time without making those SSH connections every 20min ?
I need this for both Mac machine & Windows 7 machine. Any suggestions?