Sponsored Content
Operating Systems Linux Ubuntu SSH droping connections over a VPN Post 302358868 by Phil_FL on Monday 5th of October 2009 04:30:15 AM
Old 10-05-2009
Quote:
Originally Posted by lzcool
...
The problem is that whenever I get connected to a remote computer using my VPN as router, after a while, sometimes short, sometimes long, sometimes immediately, the connection gets lost and I've to reconnect to the remote computer...
Without much activity the connection drop.
on the client side you could try to
Code:
ssh -o ServerAliveInterval=2

If it works you can set your ServerAliveInternal to whatever works (2 5 10 100 ?) in /etc/ssh/ssh_config

Basically it creates traffic to keep your session alive.

On the server side you could check or modify the ClientAliveInterval
 

8 More Discussions You Might Find Interesting

1. BSD

ipfw slow ssh and ftp connections

just as the title says. thanks. #General Rule Sets /sbin/ipfw add 0300 check-state /sbin/ipfw add 0301 deny tcp from any to any in established /sbin/ipfw add 0302 pass tcp from any to any out setup keep-state /sbin/ipfw add 0303 pass udp from any to any out #SSH FTP /sbin/ipfw add 0400... (11 Replies)
Discussion started by: dwildgoose
11 Replies

2. AIX

Show number of SSH connections

I'm investigating an issue where rsync's to an AIX server will sometimes fail. I suspect the problem might be due to the number of simultaneous SSH connections being made to the host dropping the rsync attempts. I'd like to view the number of open ssh connections. The who command will list logged... (1 Reply)
Discussion started by: indiana_tas
1 Replies

3. UNIX for Advanced & Expert Users

Disallow new ssh connections for a while ?

Hello, What is the best way to disallow new ssh connections for the duration of my session ? I want to evade read/write collisions. Things work like that - one session put files on server, other copies these files and then deletes them. So in order to evade collision: - I check if there are... (1 Reply)
Discussion started by: vilius
1 Replies

4. UNIX for Advanced & Expert Users

Need Password-Less ssh with RSA-VPN

We have RSA SecureID softtoken key generator on my Windows machine. It generates new keys every 1 minute. Any HPUX server (be it ServerD or ServerP) requires my ID and the randomly generated RSA SecureID softtoken key from my Windows to login. I login to ServerD. Then I run a script... (0 Replies)
Discussion started by: mohtashims
0 Replies

5. UNIX for Dummies Questions & Answers

Need to test 100 ssh connections in parallel using loop and sleep? How to do that ?

Hello All, I want to test how much parallel ssh connections can be done on a server. I am thinking of reading username and hostname from a file and then using a loop (may be for) to do ssh on different host. Could anyone suggest me how can i write the script for the above. Thank you in... (0 Replies)
Discussion started by: ABHIKORIA
0 Replies

6. IP Networking

VPN ssh access over RDP port?

Guys, Can I use an open RDP port to gain ssh access to my Linux server running the other side of our firewall? I work from home on the odd occasion, we only have RDP port 3389 available once logged into the VPN. I would rather ssh into my workstation without the need for a desktop display. ... (3 Replies)
Discussion started by: general_lee
3 Replies

7. Solaris

How do I keep an X session alive when my VPN/ssh disconnects so I can reconnect later?

Hi, Sorry if this question has been asked before, however, I have tried looking in the forum (and google in general) and I haven't found an answer, so I thought I'd ask here. I am trying to use a GUI application in Solaris 10. Normally I connect with a VPN then SSH and use Xming to... (2 Replies)
Discussion started by: John_sp
2 Replies

8. UNIX for Beginners Questions & Answers

Assistance with testing ssh connections and what the return codes mean

Hello Forum, I'm using a bit of code from a script I found that allows me to capture the status code of connecting via SSH to remote servers: ssh -qno StrictHostKeyChecking=no -o ConnectTimeout=1 user@$InputIP 'ls -l /home/user >/dev/null 2>&1' > /dev/null 2>&1 status="$(echo $?)" echo... (4 Replies)
Discussion started by: greavette
4 Replies
SSH-COPY-ID(1)						      General Commands Manual						    SSH-COPY-ID(1)

NAME
ssh-copy-id - install your public key in a remote machine's authorized_keys SYNOPSIS
ssh-copy-id [-i [identity_file]] [user@]machine DESCRIPTION
ssh-copy-id is a script that uses ssh to log into a remote machine (presumably using a login password, so password authentication should be enabled, unless you've done some clever use of multiple identities) It also changes the permissions of the remote user's home, ~/.ssh, and ~/.ssh/authorized_keys to remove group writability (which would oth- erwise prevent you from logging in, if the remote sshd has StrictModes set in its configuration). If the -i option is given then the identity file (defaults to ~/.ssh/id_rsa.pub) is used, regardless of whether there are any keys in your ssh-agent. Otherwise, if this: ssh-add -L provides any output, it uses that in preference to the identity file. If the -i option is used, or the ssh-add produced no output, then it uses the contents of the identity file. Once it has one or more fin- gerprints (by whatever means) it uses ssh to append them to ~/.ssh/authorized_keys on the remote machine (creating the file, and directory, if necessary) SEE ALSO
ssh(1), ssh-agent(1), sshd(8) OpenSSH 14 November 1999 SSH-COPY-ID(1)
All times are GMT -4. The time now is 10:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy