[eug-lug]mail over ssh
At work, I leave an SSH session open to my server and run Mutt off the server. Recently, our worksite acquired a firewall that closes inactive sessions after 15 minutes. So if I don't get mail for 15 minutes and don't use the terminal, it drops me. What I'd like to do is update my .muttrc file and add a clock to the status line. If I 'man muttrc', it tells me I can add %fmt to my index_format line to show the current time. Anyone familiar with mutt rc files? Can I add the %fmt to my status_format line? Any other ideas to make activity on my screen to not drop the connection? Thanks, Rob ___ EuG-LUG mailing list [EMAIL PROTECTED] http://mailman.efn.org/cgi-bin/listinfo/eug-lug
Re: [eug-lug]mail over ssh
Rob Hudson wrote: At work, I leave an SSH session open to my server and run Mutt off the server. Recently, our worksite acquired a firewall that closes inactive sessions after 15 minutes. So if I don't get mail for 15 minutes and don't use the terminal, it drops me. Go to the document root for some web site you control. Add the following to the file index.html, anywhere in the body. a href=mailto:[EMAIL PROTECTED]/a That will ensure you a steady stream of spam so your ssh connection never closes. (-: In a more serious vein, I have the same problem at TiVo, so I wrote this script, which I called printloop. #!/bin/sh while sleep 60 do echo -ne '\1' done Right after I log in, I type printloop . You might want to just stick it into your .login if $SSH_CLIENT matches ORCAS' IP address. The VT-100 emulator in xterm ignores SOH ('\1') characters, so it doesn't interfere with on-screen display. Two caveats: (1) if you scroll up in the xterm window, the SOH character will scroll you back to the bottom. (2) You can't terminate the ssh session anymore by logging out. You'll either have to kill printloop before you log out or terminate ssh by typing ~.. What I'd like to do is update my .muttrc file and add a clock to the status line. If I 'man muttrc', it tells me I can add %fmt to my index_format line to show the current time. Anyone familiar with mutt rc files? Can I add the %fmt to my status_format line? Any other ideas to make activity on my screen to not drop the connection? The variable is status_format, but it doesn't seem to support %fmt. See the Mutt Manual at /usr/share/doc/mutt*/html/ or at http://www.mutt.org/doc/manual/ . -- Bob Miller Kbob kbobsoft software consulting http://kbobsoft.com [EMAIL PROTECTED] ___ EuG-LUG mailing list [EMAIL PROTECTED] http://mailman.efn.org/cgi-bin/listinfo/eug-lug
Re: [eug-lug]mail over ssh
On 20031112.1424, Bob Miller said ... In a more serious vein, I have the same problem at TiVo, so I wrote this script, which I called printloop. #!/bin/sh while sleep 60 do echo -ne '\1' done When it runs, I see: ne \1 Show up on the screen. Server is FreeBSD. FreeBSD's echo doesn't have the 'e' flag, which allows for the escape characters. I tried using the escaped character insert mode in Vim. Thanks, Rob ___ EuG-LUG mailing list [EMAIL PROTECTED] http://mailman.efn.org/cgi-bin/listinfo/eug-lug
Re: [eug-lug]mail over ssh
On Wed, Nov 12, 2003 at 02:24:54PM -0800, Bob Miller wrote: You'll either have to kill printloop before you log out or terminate ssh by typing ~.. What does ~. do? I tried it on my command line in an ssh session but it said command not found. Nothing in the bash man page. Cory -- Cory Petkovsek Adapting Information Adaptable IT ConsultingTechnology to your (541) 914-8417 business [EMAIL PROTECTED] www.AdaptableIT.com ___ EuG-LUG mailing list [EMAIL PROTECTED] http://mailman.efn.org/cgi-bin/listinfo/eug-lug
Re: [eug-lug]mail over ssh
On 20031112.1518, Rob Hudson said ... I tried using the escaped character insert mode in Vim. And it works! Thanks kbob. ___ EuG-LUG mailing list [EMAIL PROTECTED] http://mailman.efn.org/cgi-bin/listinfo/eug-lug
Re: [eug-lug]mail over ssh
Neat idea; I tried it but it didn't work, the status_format command doesn't interpret the %fmt command the same as the index_format command, and even that doesn't update without some keyboard activity as far as I can tell. How about something silly like this: ping -i 840 myisp.net /dev/null mutt fg On 11/12/03 01pm, Rob Hudson wrote: At work, I leave an SSH session open to my server and run Mutt off the server. Recently, our worksite acquired a firewall that closes inactive sessions after 15 minutes. So if I don't get mail for 15 minutes and don't use the terminal, it drops me. What I'd like to do is update my .muttrc file and add a clock to the status line. If I 'man muttrc', it tells me I can add %fmt to my index_format line to show the current time. Anyone familiar with mutt rc files? Can I add the %fmt to my status_format line? Any other ideas to make activity on my screen to not drop the connection? Thanks, Rob ___ EuG-LUG mailing list [EMAIL PROTECTED] http://mailman.efn.org/cgi-bin/listinfo/eug-lug
Re: [eug-lug]mail over ssh
On 20031112.1352, Patrick R. Wade said ... What are you using for the SSH client? You may be able to set it to send keepalives. I had a problem like you describe telecommuting from the Growers' Market to efn, and it went away when i set 2-minute keepalives in PuTTY. I'm using just straight OpenSSH. Man page doesn't mention any keep alives for it. ___ EuG-LUG mailing list [EMAIL PROTECTED] http://mailman.efn.org/cgi-bin/listinfo/eug-lug
Re: [eug-lug]mail over ssh
On Wed, Nov 12, 2003 at 01:35:12PM -0800, Rob Hudson wrote: At work, I leave an SSH session open to my server and run Mutt off the server. Recently, our worksite acquired a firewall that closes inactive sessions after 15 minutes. So if I don't get mail for 15 minutes and don't use the terminal, it drops me. What I'd like to do is update my .muttrc file and add a clock to the status line. If I 'man muttrc', it tells me I can add %fmt to my index_format line to show the current time. Anyone familiar with mutt rc files? Can I add the %fmt to my status_format line? Any other ideas to make activity on my screen to not drop the connection? Look at the keepalive option for ssh. It should be enabled by default. You may want to verify that it is working with a verbose option. For the mutt rc files, don't look at the man page, instead look at the manual: /usr/share/doc/mutt/manual.txt.gz I don't see %fmt as an option on status_format. Also look at a ping like utility that runs in the background. Perhaps something from the hping2 package to send invalid tcp/udp packets over the tunnel (this requires making ssh a tunnel instead of a terminal). Cory -- Cory Petkovsek Adapting Information Adaptable IT ConsultingTechnology to your (541) 914-8417 business [EMAIL PROTECTED] www.AdaptableIT.com ___ EuG-LUG mailing list [EMAIL PROTECTED] http://mailman.efn.org/cgi-bin/listinfo/eug-lug
Re: [eug-lug]mail over ssh
Maybe ~ followed by ^Z (control-z) is what he is going for here? To suspend SSH, you need to put a tilde ('~') on a newline before doing the usual control-Z to suspend the SSH connection (this is protection for you, so that you can suspend another program running through SSH without suspending SSH)... then you have to hard-kill the SSH connection. regards, Ben On Wed, 12 Nov 2003 14:38:18 -0800 Cory Petkovsek [EMAIL PROTECTED] wrote: | On Wed, Nov 12, 2003 at 02:24:54PM -0800, Bob Miller wrote: | You'll either have to kill | printloop before you log out or terminate ssh by typing ~.. | | What does ~. do? I tried it on my command line in an ssh session but | it said command not found. Nothing in the bash man page. | | Cory | | ___ EuG-LUG mailing list [EMAIL PROTECTED] http://mailman.efn.org/cgi-bin/listinfo/eug-lug
Re: [eug-lug]mail over ssh
man ssh_config in $HOME/.ssh/config KeepAlive yes On Wednesday, November 12, 2003, at 03:43 PM, Rob Hudson wrote: On 20031112.1352, Patrick R. Wade said ... What are you using for the SSH client? You may be able to set it to send keepalives. I had a problem like you describe telecommuting from the Growers' Market to efn, and it went away when i set 2-minute keepalives in PuTTY. I'm using just straight OpenSSH. Man page doesn't mention any keep alives for it. ___ EuG-LUG mailing list [EMAIL PROTECTED] http://mailman.efn.org/cgi-bin/listinfo/eug-lug -- You are the eventuality of an anomaly , which despite my sincerest efforts I have been unable to eliminate from what is otherwise a harmony of mathematical precision. -The Architect Microsoft has resolved this issue. We have put processes in place to ensure there is no recurrence of this eventuality. -Microsoft ___ EuG-LUG mailing list [EMAIL PROTECTED] http://mailman.efn.org/cgi-bin/listinfo/eug-lug
Re: [eug-lug]mail over ssh
Google (and Google Groups) is your friend: http://www.brandonhutchinson.com/OpenSSH_ClientAliveInterval.html http://ajmitch.dhis.org/devel/info/misc/vinces_guide_to_openssh.txt http://groups.google.com/groups?hl=enlr=lang_enie=UTF-8oe=utf-8threadm=m1lu271dlh4.fsf%40syrinx.oankali.netrnum=9prev=/groups%3Fnum%3D20%26hl%3Den%26lr%3Dlang_en%26ie%3DUTF-8%26oe%3Dutf-8%26q%3Dopenssh%2Bkeep%2Balive%26sa%3DN%26tab%3Dwg /jgw ___ EuG-LUG mailing list [EMAIL PROTECTED] http://mailman.efn.org/cgi-bin/listinfo/eug-lug
Re: [eug-lug]mail over ssh
In Putty, the option is Sending of null packet to keep session alive (seconds between keep alives) Below is help info from Putty help doc. Maybe this will help you find an option in OpenSSH. Darren If you find your sessions are closing unexpectedly ('Connection reset by peer') after they have been idle for a while, you might want to try using this option. Some network routers and firewalls need to keep track of all connections through them. Usually, these firewalls will assume a connection is dead if no data is transferred in either direction after a certain time interval. This can cause PuTTY sessions to be unexpectedly closed by the firewall if no traffic is seen in the session for some time. The keepalive option ('Seconds between keepalives') allows you to configure PuTTY to send data through the session at regular intervals, in a way that does not disrupt the actual terminal session. If you find your firewall is cutting idle connections off, you can try entering a non-zero value in this field. The value is measured in seconds; so, for example, if your firewall cuts connections off after ten minutes then you might want to enter 300 seconds (5 minutes) in the box. Note that keepalives are not always helpful. They help if you have a firewall which drops your connection after an idle period; but if the network between you and the server suffers from breaks in connectivity then keepalives can actually make things worse. If a session is idle, and connectivity is temporarily lost between the endpoints, but the connectivity is restored before either side tries to send anything, then there will be no problem - neither endpoint will notice that anything was wrong. However, if one side does send something during the break, it will repeatedly try to re-send, and eventually give up and abandon the connection. Then when connectivity is restored, the other side will find that the first side doesn't believe there is an open connection any more. Keepalives can make this sort of problem worse, because they increase the probability that PuTTY will attempt to send data during a break in connectivity. Therefore, you might find they help connection loss, or you might find they make it worse, depending on what kind of network problems you have between you and the server. Keepalives are only supported in Telnet and SSH; the Rlogin and Raw protocols offer no way of implementing them. Note that if you are using SSH1 and the server has a bug that makes it unable to deal with SSH1 ignore messages, enabling keepalives will have no effect. - Original Message - From: Rob Hudson [EMAIL PROTECTED] To: The Eugene Unix and GNU/Linux User Group's mail list [EMAIL PROTECTED] Sent: Wednesday, November 12, 2003 3:43 PM Subject: Re: [eug-lug]mail over ssh On 20031112.1352, Patrick R. Wade said ... What are you using for the SSH client? You may be able to set it to send keepalives. I had a problem like you describe telecommuting from the Growers' Market to efn, and it went away when i set 2-minute keepalives in PuTTY. I'm using just straight OpenSSH. Man page doesn't mention any keep alives for it. ___ EuG-LUG mailing list [EMAIL PROTECTED] http://mailman.efn.org/cgi-bin/listinfo/eug-lug ___ EuG-LUG mailing list [EMAIL PROTECTED] http://mailman.efn.org/cgi-bin/listinfo/eug-lug
Re: [eug-lug]mail over ssh
On Wed, Nov 12, 2003 at 02:38:18PM -0800, Cory Petkovsek wrote: On Wed, Nov 12, 2003 at 02:24:54PM -0800, Bob Miller wrote: You'll either have to kill printloop before you log out or terminate ssh by typing ~.. What does ~. do? I tried it on my command line in an ssh session but it said command not found. Nothing in the bash man page. Cory ~ is the default escape character (presumably inheirited from rsh, which inheirited it from cu, which predates ~ for the home directory). ~. is the shortand for end-session. It must occur at the beginning of a line. There are others, like ~, which is just sending a job control signal to your local ssh client. -- That time in Seattle... was a nightmare. I came out of it dead broke, without a house, without anything except a girlfriend and a knowledge of UNIX. Well, that's something, Avi says. Normally those two are mutually exclusive.--Neal Stephenson, Cryptonomicon ___ EuG-LUG mailing list [EMAIL PROTECTED] http://mailman.efn.org/cgi-bin/listinfo/eug-lug
Re: [eug-lug]mail over ssh
On Wed, Nov 12, 2003 at 03:59:47PM -0800, Bob Miller wrote: Cory Petkovsek wrote: What does ~. do? I tried it on my command line in an ssh session but it said command not found. Nothing in the bash man page. Look in ssh(1). Tells ssh to disconnect. You have to type it at the beginning of a line or ssh just passes it on. Ah, now it works. Neato! Cory -- Cory Petkovsek Adapting Information Adaptable IT ConsultingTechnology to your (541) 914-8417 business [EMAIL PROTECTED] www.AdaptableIT.com ___ EuG-LUG mailing list [EMAIL PROTECTED] http://mailman.efn.org/cgi-bin/listinfo/eug-lug