[Solved] - Mageia 4 - 64bit - SSH disconnects

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[Solved] - Mageia 4 - 64bit - SSH disconnects

Postby linuxdad » Feb 27th, '15, 23:07

I am writing about a NEW 64 bit server which was just installed yesterday. This is a Non-borked server and still permits the ssh tunnel to disconnect. Here's the RPMs listed for the server.

rpm -qa | grep ssh
openssh-server-6.2p2-3.2.mga4
openssh-clients-6.2p2-3.2.mga4
lib64ssh2_1-1.4.3-3.mga4
openssh-6.2p2-3.2.mga4
lib64ssh4-0.5.5-2.2.mga4

Using this I also recorded the connection between this and another server and have the following info:

Code: Select all
debug1: channel 1: new [X11 inet listener]
debug1: channel 2: new [X11 inet listener]
debug1: server_input_channel_req: channel 0 request pty-req reply 1
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req pty-req
debug1: Allocating pty.
debug1: session_pty_req: session 0 alloc /dev/pts/4
debug1: server_input_channel_req: channel 0 request shell reply 1
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req shell
debug1: Setting controlling tty using TIOCSCTTY.
debug1: server_input_global_request: rtype keepalive@openssh.com want_reply 1
debug1: server_input_global_request: rtype keepalive@openssh.com want_reply 1
debug1: server_input_global_request: rtype keepalive@openssh.com want_reply 1
debug1: server_input_global_request: rtype keepalive@openssh.com want_reply 1
debug1: server_input_global_request: rtype keepalive@openssh.com want_reply 1
debug1: server_input_global_request: rtype keepalive@openssh.com want_reply 1
debug1: server_input_global_request: rtype keepalive@openssh.com want_reply 1
debug1: server_input_global_request: rtype keepalive@openssh.com want_reply 1
debug1: server_input_global_request: rtype keepalive@openssh.com want_reply 1
debug1: server_input_global_request: rtype keepalive@openssh.com want_reply 1
debug1: server_input_global_request: rtype keepalive@openssh.com want_reply 1
debug1: server_input_global_request: rtype keepalive@openssh.com want_reply 1
debug1: server_input_global_request: rtype keepalive@openssh.com want_reply 1
debug1: server_input_global_request: rtype keepalive@openssh.com want_reply 1
debug1: server_input_global_request: rtype keepalive@openssh.com want_reply 1
debug1: server_input_global_request: rtype keepalive@openssh.com want_reply 1
debug1: server_input_global_request: rtype keepalive@openssh.com want_reply 1
debug1: server_input_global_request: rtype keepalive@openssh.com want_reply 1
debug1: server_input_global_request: rtype keepalive@openssh.com want_reply 1
debug1: Received SIGCHLD.
debug1: session_by_pid: pid 14301
debug1: session_exit_message: session 0 channel 0 pid 14301
debug1: session_exit_message: release channel 0
debug1: session_pty_cleanup: session 0 release /dev/pts/4
Received disconnect from 192.168.50.5: 11: disconnected by user
debug1: do_cleanup
debug1: PAM: cleanup
debug1: PAM: closing session
debug1: PAM: deleting credentials


ssh_config has the following:

ServerAliveInterval 30
ServerAliveCountMax 9999999


I do not know what else I need for this to maintain a persistent conenction via SSH.
Last edited by linuxdad on Apr 2nd, '15, 14:36, edited 1 time in total.
Albert E. Whale, CEH CHS CISA CISSP
President - Chief Security Officer
IT Security, Inc. - http://www.IT-Security-inc.com
Pittsburgh, PA
Email: Albert.Whale@IT-Security-inc.com
linuxdad
 
Posts: 123
Joined: Nov 17th, '13, 21:14

Re: Mageia 4 - 64bit - SSH disconnects

Postby doktor5000 » Feb 28th, '15, 20:28

Did you try to enable TCPKeepAlive ?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18060
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Mageia 4 - 64bit - SSH disconnects

Postby linuxdad » Feb 28th, '15, 21:46

Yes Doctor, I did.

grep TCP /etc/ssh/*config
/etc/ssh/sshd_config:TCPKeepAlive yes

So far, I am batting 0 on the 64 bit versions of ssh on Mageia. The 32 bit version works perfectly fine, on a 32 bit machine (I have not attempted this on a 64-bit server).

So what's next?
Albert E. Whale, CEH CHS CISA CISSP
President - Chief Security Officer
IT Security, Inc. - http://www.IT-Security-inc.com
Pittsburgh, PA
Email: Albert.Whale@IT-Security-inc.com
linuxdad
 
Posts: 123
Joined: Nov 17th, '13, 21:14

Re: Mageia 4 - 64bit - SSH disconnects

Postby linuxdad » Mar 29th, '15, 20:11

I am bringing this up again, because I cannot resolve this issue.

I have examined many sites, including this interesting one:

https://sysadmincasts.com/episodes/39-cli-monday-how-to-keep-your-ssh-sessions-alive

The problem I have is that I can connect to a Mageia Linux server with 32 bit architecture and NEVER disconnect. As soon as I try to connect to a 64-bit OS, I end up with the following:

Code: Select all
Password:
debug1: Authentication succeeded (keyboard-interactive).
Authenticated to ns4.IT-Security-inc.com ([66.207.133.232]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
Last login: Sun Mar 29 11:49:51 2015 from pool-74-98-231-231.pitbpa.fios.verizon.net
ns4.it-security-inc.com aewhale
[/home/aewhale] timed out waiting for input: auto-logout
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to ns4.IT-Security-inc.com closed.
Transferred: sent 3596, received 3288 bytes, in 600.1 seconds
Bytes per second: sent 6.0, received 5.5
debug1: Exit status 0
Sun Mar 29 12:19:22 EDT 2015


So, I am left wondering, what is going on in the 32-bit version which is not happening in the 64-bit version?

And most of all, how do I get a perssistent SSH connection accomplished? (Notice this is ONLY Observed in Mageia, no other versions of Linux).
Albert E. Whale, CEH CHS CISA CISSP
President - Chief Security Officer
IT Security, Inc. - http://www.IT-Security-inc.com
Pittsburgh, PA
Email: Albert.Whale@IT-Security-inc.com
linuxdad
 
Posts: 123
Joined: Nov 17th, '13, 21:14

Re: Mageia 4 - 64bit - SSH disconnects

Postby doktor5000 » Mar 29th, '15, 21:12

linuxdad wrote:As soon as I try to connect to a 64-bit OS, I end up with the following:
Code: Select all
[/home/aewhale] timed out waiting for input: auto-logout


Seems you have timeout enabled. http://www.adercon.com/ac/node/39

Maybe you have enabled that via one of the higher msec security levels?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18060
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Mageia 4 - 64bit - SSH disconnects

Postby linuxdad » Apr 2nd, '15, 14:36

Bingo, this is also what I found.
Code: Select all
[/etc/security/msec] grep SHELL *
level.secure:SHELL_TIMEOUT=600


Setting this to 0 clears the issues!
Last edited by isadora on Apr 2nd, '15, 15:32, edited 1 time in total.
Reason: Command-output placed between [CODE]-tags, for better readability. ;)
Albert E. Whale, CEH CHS CISA CISSP
President - Chief Security Officer
IT Security, Inc. - http://www.IT-Security-inc.com
Pittsburgh, PA
Email: Albert.Whale@IT-Security-inc.com
linuxdad
 
Posts: 123
Joined: Nov 17th, '13, 21:14


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest