Openssh Client Hangs on Logout When Forwarding X Connections

OpenSSH client hangs on logout when forwarding X connections

This is because the process you start opens a stream (stdout/stderr) and doesn't close it. Have a look here for a more in-depth explanation and possible solutions.

XCloseDisplay hangs

Solved. The problem was not with X11 but with the compilation process. Some headers were updated but the source file were not. If you have problem like this, remember to delete your object files and build the whole application again.

Quitting ssh -X session with a running GUI program but leaving the program to run on the remote host

Long story short - you can't do this without making some modifications to the way you run things. A GUI application requires for an X server target to be accepting it's GUI updates - if you're using your local X server to do this, then it'll require (1) the connection to be open (2) that you actually handle the updates.

A way around this is to use something like Xvfb - which is a headless way of hosting a virtual X-server. Above and beyond the examples provided on the wikipedia page, folks who seem to make frequent use of this mechanism are Selenium users.

Keep SSH session alive while computer sleep?

I found the answer it depends on tcp keepalive settings:

For the list of available TCP settings (FreeBSD 4.8 an up and 5.4):

sysctl -A | grep net.inet.tcp
  • net.inet.tcp.keepidle - Amount of time, in milliseconds, that the (TCP) connection must be idle before keepalive probes (if enabled) are sent.

  • net.inet.tcp.keepintvl - The interval, in milliseconds, between keepalive probes sent to remote machines. After TCPTV_KEEPCNT (default 8) probes are sent, with no response, the (TCP)connection is dropped.

  • net.inet.tcp.always_keepalive - Assume that SO_KEEPALIVE is set on all TCP connections, the kernel will periodically send a packet to the remote host to verify the connection is still up.

Therefore formula to calculate maximum TCP inactive connection time is following:

net.inet.tcp.keepidle + (net.inet.tcp.keepintvl x 8)

the result is in milliseconds. Therefore, by setting

net.inet.tcp.keepidle = 10000
net.inet.tcp.keepintvl = 5000
net.inet.tcp.always_keepalive = 1 (must be 1 always)

the system will disconnect a call when TCP connection is dead for: 10000 + (5000 x 8) = 50000 msec (50 sec). To make system remember these settings at startup, you should add them to /etc/sysctl.conf file

How not to pass the locale through an ssh connection command

It sounds like your SSH client is configured to forward the locale settings. You can prevent this by altering your configuration (the global file is typically /etc/ssh/ssh_config):

# comment out / remove the following line
SendEnv LANG LC_*

Alternatively you can change the configuration of the server, by editing /etc/ssh/sshd_config on the remote machine (note the d in sshd_config):

# comment out / remove the following line
AcceptEnv LANG LC_*

GSS authentication for openssh client (Scientific Linux)

http://grid.ncsa.illinois.edu/ssh contains the port for GSS protocol and seems to maintain pacthes against openssh very well.



Related Topics



Leave a reply



Submit