LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-15-2014, 01:40 AM   #1
user@123
LQ Newbie
 
Registered: Mar 2014
Posts: 18

Rep: Reputation: Disabled
Server side configuration changes if ssh client is disconnected.


Hello All,

Is there any way to know server that client connection is disconnected. If client is connected to server using ssh and after performing some actions client becomes unreachable (because of ip change), then is there any event or signal generated at server side that client is no more reachable.
 
Old 04-15-2014, 07:42 AM   #2
raubvogel
LQ Newbie
 
Registered: Jan 2014
Posts: 7

Rep: Reputation: Disabled
I am not sure exactly what you are doing, so I will do my best to punt: I *think* you have a host, "client" which connected the host "server" using ssh. And then one of them, client I believe becomes unreachable. Am I correct?

You can specify a timeout in ssh: when it expires (nothing happened in the ssh connection, in this case due to one of the machines becoming unreacheable), the ssh connection will drop. You can monitor for that.

Another way it to have a script that keeps checking if the client is reacheable using ping or something. If you are ssh'ing into (not from) the machine that might change its IP, you can also check if its ssh port is open.
 
Old 04-22-2014, 12:59 AM   #3
user@123
LQ Newbie
 
Registered: Mar 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
@raubvogel did not suggest where can i specify a timeout in ssh.
Let mi tell you i tried changing idle ssh timeout value by adding following lines to file /etc/profile.
TMOUT=300
export TMOUT
This will disconnect ssh session after 5 minutes being idle, but this is not required to mi, I want to disconnect client's session if client is not reachable. I observed that if client is running some process on server and then if it becomes unreachable, after very long time approximately 2-3 hours (note that this value is different than idle timeout value) server closes that client's ssh connection. Now can anybody tell mi that where can i find this settings and change it?
 
Old 05-05-2014, 05:32 AM   #4
user@123
LQ Newbie
 
Registered: Mar 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
I found solution on http://www.tldp.org/HOWTO/html_singl...epalive-HOWTO/.

Last edited by user@123; 05-05-2014 at 05:35 AM.
 
  


Reply

Tags
linux, ssh


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH: can login on server but no output on client side usernameok Linux - Security 1 08-27-2013 07:32 PM
Microsoft server side / client side technologies? nibraz General 1 01-03-2013 11:12 AM
Mounting multiple NFS or Samba shares: client-side or server-side? mariogiov Linux - Server 4 04-03-2012 09:11 AM
ssh - outgoing (client-side) port mattca Linux - Software 12 06-16-2010 12:52 PM
Possible to call a client side command from a script on server, via SSH connection. a2brute Linux - Networking 7 04-07-2008 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration