Caras... to com o Xp aqui em casa e quando abro o putty, para dar um saqui no meu server do outro lado da cidade depois de um certo tempo a sessão fecha... cois de uns 2 minutos...
Tem como evitar isso editando algum arquivo de configuração?
Caras... to com o Xp aqui em casa e quando abro o putty, para dar um saqui no meu server do outro lado da cidade depois de um certo tempo a sessão fecha... cois de uns 2 minutos...
Tem como evitar isso editando algum arquivo de configuração?
Não consegui achar o arquivo de configuração que determina o tempo da seção de SSH Cara
eh a a ClientAliveInterval :P
Valeu cara... daqui a pouco vou lá dar um saque nesse parametro.
Tú não para de dar lingua não eh? :@:
Parabéns pelos 4000 posts
não e não pretendo parar tão cedo, to qurendo me organizar melhor pra poder falar mais ainda heheheh
Achei isto aqui:
HostKey /etc/ssh/ssh_host_key
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
ServerKeyBits 768
LoginGraceTime 600 <---------------------------- acho que eh aqui
KeyRegenerationInterval 3600
Será?
nao, isso ae eh o timeout do login, qdo abre o prompt, se a pessoa nao entrar com o login nesse tempo ai ele mata a conexao.......
jah te falei qual eh a variavel
Aí vai o meu ssh_conf cara....
-----------------------------------------------------------------------------------------------------
# $OpenBSD: ssh_config,v 1.16 2002/07/03 14:21:05 markus Exp $
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.
# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.
# Site-wide defaults for various options
# Host *
# ForwardAgent no
ForwardX11 yes
# RhostsAuthentication no
# RhostsRSAAuthentication no
# RSAAuthentication yes
# PasswordAuthentication yes
# HostbasedAuthentication no
# BatchMode no
# CheckHostIP yes
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
# Protocol 2,1
# Cipher 3des
# Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
# EscapeChar ~
-----------------------------------------------------------------------------------------------------
Tem também o sshd_conf
-----------------------------------------------------------------------------------------------------
# $OpenBSD: sshd_config,v 1.38 2001/04/15 21:41:29 deraadt Exp $
# This sshd was compiled with PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
# This is the sshd server system-wide configuration file. See sshd(8)
# for more information.
Port 22
#Protocol 2,1
#ListenAddress 0.0.0.0
#ListenAddress ::
HostKey /etc/ssh/ssh_host_key
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
ServerKeyBits 768
LoginGraceTime 600
KeyRegenerationInterval 3600
PermitRootLogin yes
IgnoreRhosts yes
#IgnoreUserKnownHosts yes
StrictModes yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog no
KeepAlive yes
SyslogFacility AUTH
LogLevel INFO
#RhostsAuthentication no
RhostsRSAAuthentication no
HostbasedAuthentication no
RSAAuthentication yes
ChallengeResponseAuthentication yes
PasswordAuthentication yes
PermitEmptyPasswords no
# Uncomment to enable PAM keyboard-interactive authentication
# Warning: enabling this may bypass the setting of 'PasswordAuthentication'
#PAMAuthenticationViaKbdInt yes
# To change Kerberos options
# NB: Debian's ssh ships without Kerberos Support
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#AFSTokenPassing no
#KerberosTicketCleanup no
# Kerberos TGT Passing does only work with the AFS kaserver
#KerberosTgtPassing yes
#CheckMail yes
#UseLogin no
#MaxStartups 10:30:60
#Banner /etc/issue.net
#ReverseMappingCheck yes
Subsystem sftp /usr/lib/sftp-server
UsePAM yes
-----------------------------------------------------------------------------------------------------
Divirta-se
cara jah te dei a resposta >>>>>>>>
vc ainda nao coloco isso no teu confPostado originalmente por 1c3_m4n
Na verdade veio... o LoginGraceTime serve pra derrubar o nego depois de XXX segundos estando logado... Pelomenos utilizo ele em todos os meus servers com valor 300, e se eu nao fazer nada por mais de 5 minutos minha conexao cai... :good:Postado originalmente por 1c3_m4n
hmmm acho q temos algum conflito eheheh
http://www.openbsd.org/cgi-bin/man.c...nfig&sektion=5
LoginGraceTime
The server disconnects after this time if the user has not suc-
cessfully logged in. If the value is 0, there is no time limit.
The default is 120 seconds.
se a pessoa nao logar depois de X segundos ele fecha a conexao, ou to viajando?
Rapaix.... heheeh conflitão mesmo... :PPostado originalmente por 1c3_m4n
Pois o troxo funciona comigo em 4 servers, e eu jah tinha lido sobre esse clientealive só não tinha testado pq o grace já tinha funcionado, só que quando li sobre o alive achei meio estranho também porque no man não menciona desconeccao do usuario, só diz que envia uma mensagem para o cliente requisitando uma resposta, acho que isso eh basicamente para testar se o cliente nao tah morto (ssh tah defunct ou coisa do tipo) como o nome menciona alive, deve ser estilo keepalive....
-------------------
ClientAliveInterval
Sets a timeout interval in seconds after which if no data has
been received from the client, sshd will send a message through
the encrypted channel to request a response from the client. The
default is 0, indicating that these messages will not be sent to
the client. This option applies to protocol version 2 only.
-------------------
WEIRDO neh? heheeh
:P
Eh o Client Alive eh issu ae mesmo q vc falou, ele manda uma requisicao pro cliente, se nao tiver uma resposta ele corta a sessao.
Acho que tava funcionando ae pela coincidencia das duas variaveis estarem com o mesmo tempo de timeout, bom sei lah, aumenta o logingrace e ve se a conexao vai morrer no mesmo tempo
Ok vou fazer isso....
Vamos ver no que vai dar.
Meus ClientAliveInterval estão todos comentados :PPostado originalmente por 1c3_m4n
Depois quando não tiver nada pra fazer eu testo :P