That depends on how you are logging in. Automatic logout is up to the administrator. If you are logging in via ssh, there is a configuration option for sshd to determine the amount of idle time before terminating the connection (TCPKeepAlive -helps when routers drop idle connections, ClientAliveInterval, ClientAliveCountMax used by the server to determine if the connection should remain. You can google for a detailed explanation of these three.)
Bypassing login doesn't work very well...