Всем доброго времени суток! Помогите разрешить вот такой вот вопрос. Настраиваю на Fedor'е ssh соединение. В iptables прописал порт 223 таким вот образом:iptables -A INPUT -p tcp -m tcp --dport 223 -j ACCEPT. В конфиге, который находиться в \etc\ssh\ssh_config разремил строчку Port 223. Нет соединения на данный порт, а когда ставлю на эту строчку ремарку(#), то по умолчанию он конектится на 22й порт. Где я оплошал?
[quote=PartiZan]Да, перезапускал и даже ребутил тачку - так на всякий случай.
после перезапуска порт слушается службой? через netstat или socklist можно проверить.
И когда подключаетесь, так ли указываете ssh -p 223 user@host[/quote]
Блин, так надо менять то здесь 22>223
/etc/ssh/sshd_config
а не здесь:
/etc/ssh/ssh_config
я там и поменял, я допустил опечатку, изменения были произведены в /etc/ssh/sshd_config, а не в /etc/ssh/ssh_config -такого файла у меня и нет. Прошу прощения, пойду пройдусь, а то голова не варит.
не пойму причем тут это, если по умолчанию (с дефаултовым конфигом) на 22 порт конектится безпроблем!? Хочу поменять порт на который можно былобы законектиться с помощью putty. В этом вся проблема.
Если отключить файрволл вообще, то коннектится на 223?
Давай локализуем проблему в файрволе или в ссш.
дело в том, что есть еще один сервак RHEL, на нем такиеже настройки в iptables, и все конектиться. Правда файл /etc/ssh/sshd_conf немного изменен. Вот его исходник:
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin
# 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 223
#Protocol 2,1
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 2048
# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6
# 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 yes
#PermitEmptyPasswords no
###########Commented by me
#PasswordAuthentication yes
# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
###########Commented by me
#ChallengeResponseAuthentication no
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
###########Commented by me
#GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
###########Commented by me
#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 mechanism.
# Depending on your PAM configuration, this may bypass the setting of
# PasswordAuthentication, PermitEmptyPasswords, and
# "PermitRootLogin without-password". If you just want the PAM account and
# session checks to run without PAM authentication, then enable this but set
# ChallengeResponseAuthentication=no
#UsePAM no
###########Commented by me
#UsePAM yes
# Accept locale-related environment variables
#AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
#AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
#AcceptEnv LC_IDENTIFICATION LC_ALL
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
###########Commented by me
#X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#ShowPatchLevel no
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no
# no default banner path
#Banner /some/path
# override default of no subsystems
Subsystem sftp /usr/libexec/openssh/sftp-server
PartiZan, и где ты видишь здесь sshd? у тебя он не запущен.
странно, я думал, что chkconfig мне выдал, что 3,4,5 пункты включены, и даже после запуска вручную: /etc/init.d/sshd start, он пишет ok. Затем #netstat -an|grep tcp, ответ тотже который и был выше. Или это не причем, я ошибаюсь?
странно, я думал, что chkconfig мне выдал, что 3,4,5 пункты включены, и даже после запуска вручную: /etc/init.d/sshd start, он пишет ok. Затем #netstat -an|grep tcp, ответ тотже который и был выше. Или это не причем, я ошибаюсь?
Что выдаёт service sshd start и service sshd status?
text
service sshd start
[console]OK[/console]
text
service sshd status
[console]sshd.service - LSB: Start up the OpenSSH server daemon
Loaded: loaded (/etc/init.d/sshd)
Active: active (exited) since Web, 02 Nov 2011 20:10:15 +0300; 30min ago
Process: 882 ExecStart=/etc/rc.d/init.d/sshd start (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/sshd.service[/console]