what can be done when remote ssh connection dropped and konsole become not responding ?


Old Yesterday, 01:38 AM   #1

Member

 

Registered: Mar 2020

Posts: 547


Rep: Reputation: Disabled

what can be done when remote ssh connection dropped and konsole become not responding ?

I am learning ssh on KDE to remote ssh server. Question1: while i was connected to remote ssh server, when i need to rush to leave home, i would just "suspend the local machine into ram" . Is it ok like this ? will the "hanging" connection give loop hole to some hacker ? or it will not, since it is ssh.. what is the proper procedure to disconnect remote ssh ? " quit " command ? Question2: After i woke up the local computer from ram suspend, the konsole will be not responding to anything... it will not try to reconnect.. the console just doing nothing.. i have to close the konsole windows and reopen another konsole window in order to start a new ssh connection. What are the way to "reset" the hanging console apart from close the window and reopen window ? Question3: There is one case i encountered, the ssh still connected after woke from suspension, any idea how ? Why only 1 time it ever "still connected" while other cases, not ?

Thx

 
Old Yesterday, 01:45 AM   #2

LQ Guru

 

Registered: Apr 2005

Distribution: Linux Mint, Devuan, OpenBSD

Posts: 5,674


Rep: Reputation: 2906Reputation: 2906Reputation: 2906Reputation: 2906Reputation: 2906Reputation: 2906Reputation: 2906Reputation: 2906Reputation: 2906Reputation: 2906Reputation: 2906

1) You can usually disconnect the remote session by exiting the program. If it is the shell, type "exit". Or you use an escape sequence, "~.", to disconnect. See "man ssh" and scroll down to the section on escape characters. 2) More information is needed. Was there a program running prior to the suspend?

3) The timeout had not been exceeded. You can set ClientAliveCountMax and ClientAliveInterval in the SSH server's configuration file or you can set ServerAliveCountMax and ServerAliveInterval in the client's configuration file. See "man sshd_config" or "man ssh_config". The client's configuration file is usually ~/.ssh/config but you might have to create it yourself.

 
Old Yesterday, 02:47 PM   #3

Member

 

Registered: Mar 2020

Posts: 547


Original Poster

Rep: Reputation: Disabled

Quote:

Originally Posted by Turbocapitalist View Post
1) You can usually disconnect the remote session by exiting the program. If it is the shell, type "exit". Or you use an escape sequence, "~.", to disconnect. See "man ssh" and scroll down to the section on escape characters.

2) More information is needed. Was there a program running prior to the suspend?

The escape character and other escape characters are mostly not working.. however " ~? " this one work. lol.

No, there was no program running, only empty shell.

 
Old Yesterday, 02:51 PM   #4

Member

 

Registered: Mar 2020

Posts: 547


Original Poster

Rep: Reputation: Disabled

It is ok.. This is not something i really need an answer to.. if there is answer; i am grateful, if no also never mind.