LinuxForum.Fans
Тема

Проблема с ssh

Автор: drac753 7 сообщений 1995 просмотров
#202669

есть две тачки в разных подсетях , пытаюсь приконектится к одной из них


root@debian:~/.ssh# ssh 192.168.4.25
The authenticity of host '192.168.4.25 (192.168.4.25)' can't be established.
RSA key fingerprint is 81:17:24:c9:c7:d0:30:c1:33:6b:75:d3:c4:5a:bf:13.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.4.25' (RSA) to the list of known hosts.
примерно через минуту появляется
root@192.168.4.25's password:
после вода пароля все работает как надо , выхожу , цепляюсь заново- опять проходит минута две до появления строки root@192.168.4.25's password: , в чем может быть причина ?

#202670

причем проблема появилась после того как поменял ip тачки к которй конекчусь

#202671
drac753 написал:
в чем может быть причина ?

в сети.

#202674
text

64 bytes from 192.168.4.25: icmp_req=1 ttl=64 time=2.79 ms
64 bytes from 192.168.4.25: icmp_req=2 ttl=64 time=0.506 ms
64 bytes from 192.168.4.25: icmp_req=3 ttl=64 time=0.475 ms
64 bytes from 192.168.4.25: icmp_req=4 ttl=64 time=0.451 ms
64 bytes from 192.168.4.25: icmp_req=5 ttl=64 time=0.469 ms
64 bytes from 192.168.4.25: icmp_req=6 ttl=64 time=0.341 ms
64 bytes from 192.168.4.25: icmp_req=7 ttl=64 time=0.481 ms
64 bytes from 192.168.4.25: icmp_req=8 ttl=64 time=0.444 ms
64 bytes from 192.168.4.25: icmp_req=9 ttl=64 time=0.398 ms
64 bytes from 192.168.4.25: icmp_req=10 ttl=64 time=0.445 ms
64 bytes from 192.168.4.25: icmp_req=11 ttl=64 time=0.452 ms
64 bytes from 192.168.4.25: icmp_req=12 ttl=64 time=0.362 ms
64 bytes from 192.168.4.25: icmp_req=13 ttl=64 time=0.388 ms
64 bytes from 192.168.4.25: icmp_req=14 ttl=64 time=0.378 ms
64 bytes from 192.168.4.25: icmp_req=15 ttl=64 time=0.523 ms
64 bytes from 192.168.4.25: icmp_req=16 ttl=64 time=0.535 ms
64 bytes from 192.168.4.25: icmp_req=17 ttl=64 time=0.477 ms
64 bytes from 192.168.4.25: icmp_req=18 ttl=64 time=0.468 ms

#202675

как вариант, такое может быть еще из-за dns, укажи в кофниге sshd, usedns yes, вроде так.

#202681

не помогло

text

root@debian:/etc/ssh# cat sshd_config 
# Package generated configuration file
# See the sshd_config(5) manpage for details

# What ports, IPs and protocols we listen for Port 22 # Use these options to restrict which interfaces/protocols sshd will bind to #ListenAddress :: #ListenAddress 0.0.0.0 Protocol 2 # HostKeys for protocol version 2 HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_dsa_key #Privilege Separation is turned on for security UsePrivilegeSeparation yes

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

# Logging SyslogFacility AUTH LogLevel INFO

# Authentication: LoginGraceTime 120 PermitRootLogin yes StrictModes yes

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

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

# To enable empty passwords, change to yes (NOT RECOMMENDED) PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with # some PAM modules and threads) ChallengeResponseAuthentication no

# Change to no to disable tunnelled clear text passwords #PasswordAuthentication yes

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

# GSSAPI options #GSSAPIAuthentication no #GSSAPICleanupCredentials yes

X11Forwarding yes X11DisplayOffset 10 PrintMotd no PrintLastLog yes TCPKeepAlive yes #UseLogin no

#MaxStartups 10:30:60 #Banner /etc/issue.net

# Allow client to pass locale environment variables AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

# 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 usedns yes

#202755

Всем спасибо , поставил UseDNS no на машине к котрой цепляюсь и все нормализовалось

Войдите или зарегистрируйтесь, чтобы ответить.