Автор Тема: (РЕШЕН) Проблем със ssh  (Прочетена 1697 пъти)

empty

  • Напреднали
  • *****
  • Публикации: 893
  • Distribution: Gentoo
  • Window Manager: KDE
  • Alien Invader
    • Профил
    • WWW
(РЕШЕН) Проблем със ssh
« -: Jun 20, 2008, 17:34 »
Проблема е, че като съм не активен на сървъра си той ме изхвърля от SSH. Не знам това на какво се дължи. Ако си работя няма проблеми, но ако не работя на сървъра той ми затваря сесията.
Сървъра е:
Linux tequila.osguides.net 2.6.25-gentoo-r2 #6 SMP Thu May 15 09:45:40 UTC 2008 i686 Intel® Celeron® CPU 2.40GHz GenuineIntel GNU/Linux

SSH версия: OpenSSH_4.7p1, OpenSSL 0.9.8g 19 Oct 2007

sshd_config
Примерен код
#       $OpenBSD: sshd_config,v 1.74 2006/07/19 13:07:10 dtucker Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options change a
# default value.

Port 222
Protocol 2
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile     .ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
#PermitEmptyPasswords no

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes

#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no

# no default banner path
#Banner /some/path

# here are the new patched ldap related tokens
# entries in your LDAP must have posixAccount & ldapPublicKey objectclass
#UseLPK yes
#LpkLdapConf /etc/ldap.conf
#LpkServers  ldap://10.1.7.1 ldap://10.1.7.2
#LpkUserDN   ou=users,dc=phear,dc=org
#LpkGroupDN  ou=groups,dc=phear,dc=org
#LpkBindDN cn=Manager,dc=phear,dc=org
#LpkBindPw secret
#LpkServerGroup mail
#LpkForceTLS no
#LpkSearchTimelimit 3
#LpkBindTimelimit 3

# override default of no subsystems
Subsystem       sftp    /usr/lib/misc/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
#       X11Forwarding no
#       AllowTcpForwarding no
#       ForceCommand cvs server


Благодаря.



Активен

Powered by 220 Volts.

rpetrov

  • Напреднали
  • *****
  • Публикации: 571
    • Профил
    • WWW
(РЕШЕН) Проблем със ssh
« Отговор #1 -: Jun 20, 2008, 18:22 »
http://openssh.com/faq.html#2.12 ?
Активен

empty

  • Напреднали
  • *****
  • Публикации: 893
  • Distribution: Gentoo
  • Window Manager: KDE
  • Alien Invader
    • Профил
    • WWW
(РЕШЕН) Проблем със ssh
« Отговор #2 -: Jun 20, 2008, 21:59 »
Евала! Мерси много!
Активен

Powered by 220 Volts.

gat3way

  • Напреднали
  • *****
  • Публикации: 6050
  • Relentless troll
    • Профил
    • WWW
(РЕШЕН) Проблем със ssh
« Отговор #3 -: Jun 21, 2008, 01:12 »
А, това реши ли проблема? Щото имам груби спомени, че connection tracking-a при мене (дебиан) пази информация за връзките изключително дълго време, с дни. Това без да бутам каквито и да било настройки. При това положение не би трябвало точно там да е проблема.
Активен

"Knowledge is power" - France is Bacon

zeridon

  • Killmode enabled
  • Administrator
  • Напреднали
  • *****
  • Публикации: 1398
  • Distribution: Debian/Ubuntu
  • Window Manager: console/Gnome
  • BOfH
    • Профил
    • WWW
(РЕШЕН) Проблем със ssh
« Отговор #4 -: Jun 23, 2008, 10:39 »
Аз лично бих препоръчал и включването на TCPKeepAlive опцията. За съжаление обаче тя има малко неприятни странични ефекти ако се изпълнява нещо подобно на "ssh -vv"
Активен

Внмимавай имам клещи за кабел
http://www.netsecad.com/
http://theregister.co.uk/odds/bofh/

empty

  • Напреднали
  • *****
  • Публикации: 893
  • Distribution: Gentoo
  • Window Manager: KDE
  • Alien Invader
    • Профил
    • WWW
(РЕШЕН) Проблем със ssh
« Отговор #5 -: Jun 27, 2008, 01:54 »
Свърши прекрасна работа! Точно каквото ми трябваше. Благодаря още веднъж!
Активен

Powered by 220 Volts.