LINUX.ORG.RU
ФорумAdmin

Проблема с подключением по ssh


0

1

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

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: , в чем может быть причина ?

★★

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

drac753 ★★
() автор топика
Ответ на: комментарий от drac753

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 no

drac753 ★★
() автор топика
Ответ на: комментарий от drac753

> sshd_config компа с которого конекчусь

зачем?

sshd_config компа НА которого конекчусь

uspen ★★★★★
()
Ответ на: комментарий от power

Что DNS?

Прочитал как «Что такое DNS?». бывает.

Tanger ★★★★★
()
Ответ на: комментарий от Pinkbyte

Не угадал. Этот параметр нужен, чтобы удалённый комп ПОСЛЕ ввода пароля не проверял клиента по DNS. Если таймаут ДО ввода пароля - нужно править /etc/hosts на ssh-клиенте

Кстати, кто-нибудьзнает, что писать с ssh_config (или ~/.ssh/config) вместо правки /etc/hosts ? Такое вообще возможно?

router ★★★★★
()
Ответ на: комментарий от router

Почему все так уверены что проблема в DNS? ТС же написал что пауза неодинакова (минута-две)? Похоже, конечно, на DNS, но все же.

ТС, попробуй подключиться с параметром -vv, на каком месте задержка?

power
()
Ответ на: комментарий от anton_jugatsu

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

drac753 ★★
() автор топика
Ответ на: комментарий от router

>ПОСЛЕ ввода пароля

ну хз, без отключения этого параметра у меня на серваках где еще не настроен DNS всё тормозит ДО ввода пароля

Pinkbyte ★★★★★
()
Ответ на: комментарий от power

>Почему все так уверены что проблема в DNS?

одна из самых распространенных проблем, плюс ответ ТС ниже это подтвердил

Pinkbyte ★★★★★
()

а как вообще дела с ping'ом?

disee ★★★
()

В ~/.ssh/known_hosts или как-то так по смыслу посмотрите список ключей, удалите старый и новый ip-адреса и все что после них. Соединетесь два раза.

Если во второй раз проблема та же - не знаю.

mkengzii
()
Ответ на: комментарий от mkengzii

> В ~/.ssh/known_hosts или как-то так по смыслу посмотрите список ключей, удалите старый и новый ip-адреса и все что после них.

Уже давно не указываются ip'шники в known_hosts.

shell-script ★★★★★
()
Ответ на: комментарий от Pinkbyte

>Буду краток

/etc/ssh/sshd_config
параметр UseDNS no

Буду краток.

Чинить надо причину, а не следствие.

four-two-two
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.