Unfortunately, I think each VPN client will be picky about this in its own way. Since the network is dropping from underneath the SSH connection, you will have three scenarios that could cause it to "hang", or just drop (that I can think of).
- Data is flowing back and forth, and the connection is gone.
- You get a new IP address when reconnecting.
- Timeout/Alive conditions trigger before you reconnect.
2 Suggestions...
- Use screen (you said you don't want to do this, I know, but it really is the most robust solution. There are scripts out there that can greatly enhance/automate the reconnection process).
- Compare your SSH configurations. Usually stored in
/etc/ssh_config
or similiar.
BTW -- I don't think you should need to close windows, just do "~ ." (tilde dot). Tilde is used to control the ssh session. See the manpage for more details.
Another update... I started fresh with a new install of Lion. Updated to 10.7.3 first, having read about everyone's nightmares after this update.
Anyway, my Kerberos realm is now set to domain1.com, but Profile Manager still insists on using the incoming server name (hostname.domain1.com)as the email address. I tried using both variables, %email% and %short_name%@domain1.com. No luck either way.
What I find aggravating is that if you view the Profile when it is installed, or in Systems Settings > Profiles, the email address is correct. This was also the case before I started over. This leads me to believe that the profiles are somehow not implemented correctly by either Mail or the profile installation process. I looked at the XML in the profile, and do not see any settings that would be responsible for the behavior. Everywhere I used a variable, the resulting values were precisely as I expected.
I again tested the default "Settings for Everyone" profile that is configured automatically based on your server settings, and the Server Admin > Mail > General > "Host name:" setting still takes precedence. So, if you put your actual hostname in this field (i.e. mail.domain.com) your users will all end up using user@mail.domain.com as an address.
I am admitting defeat for now, and just set up A records for domain.com that point to the mail server. This way, I can set my two profiles up, one for each that use domain1.com and domain2.com, respectively, as their incoming servers. The email address will then default to %short_name%@incomingserver
Best Answer
There are two ways I manage, or have seen people manage, SSH data:
Good 'ole, command line, plain text, ssh_config file.
Create a file called
config
inside~/.ssh
. You can specify global parameters by putting them above any host declarations. When I started using MacPorts, I had to explicitly define a default SSH Private Key to use automatically when connecting, so as the very first line of the file I put;When you define custom rules for hosts (and you can even use * as a wildcard), it looks something like this:
Then when I run
ssh prod-script
for example, all the rest of the rules get applied automatically.A lot of people who don't want to manually manage all their stuff in such a cumbersome manner quickly find JellyfiSSH. (Mac App Store Link. The same people also became very annoyed when it stopped being downloadable for free.)
JellyfiSSH gives you GUI access to almost everything that can be specified in the command line or ssh_config file. JellyfiSSH is just a configuration storage app for organization purposes, because it generates the commands based off the options you set and upon clicking connect, opens a new terminal window with all of your options defined on the command line. JellyfiSSH is not a terminal app on it's own.