一台主机作为局域网网关,装有双网卡,系统是RedHat9.0。eth0.为.内网地址,eth1为公网地址。在局域网内SS.H用内网地址或公司地址都可以登陆主机。但从公网上用SSH不能登陆主机。 建材
请问如何配置.SSH才能从公网上登陆主机?--- 印刷
谢谢!!
/etc/ssh/sshd_config配.置如下:.
# $OpenBSD:. sshd_config,v 1.56 2002/06/.20 23:37:12 markus Exp $虚拟主机
# This is the. sshd server system-wide configuration. file. See.
# sshd_conf..ig(5) for more information.学习
# This sshd was compiled. .with PATH=/usr/local/bin:/bin:/usr/bin外贸
# The. strategy used for opti.ons in the default sshd_config shipped with.
# OpenSSH i..s to specify options with their default value where--- 印刷
# possible, .but leave them c.ommented. Uncommented options change a学习
# def.ault value.电脑
#Port 22
#Protocol 2,1
#.ListenAddress 0.0.0.0虚拟主机
#ListenAddress .::<性病>
# HostKey for p.r.otocol version 1.
#Host.Key /etc/s.sh/ssh_host_key.
# HostKeys fo.r proto.col version 2.
#HostKey ./etc/ssh/ssh_host_r.sa_key 女人
#HostKey /etc/ssh../ssh_host_dsa_key教育
# Lifetime and size of ephemeral .version 1 server ke.y 杀毒
#KeyRegenerationI.nterval 36.00教育
#S.erverKeyBits 768电脑
# Logging
#obsoletes QuietMode and Fasci.stL.ogging.
#SyslogFacil.ity AUTH.
SyslogF.acility AUTHPRIV 乙肝
#LogLevel INFO
# Authentica.tion:外贸
#Logi.nGraceTime 600.
#PermitRootLogin ye.s外贸
#Stri.ctModes yes.
#RSAAuthentication y.es 外汇
#PubkeyAuthentica.tion yes.
#AuthorizedKeysFile .ssh/authori.zed._keys.
# rhos.ts auth.entication should not be used服务器
#Rho.stsAuthentication no[成人用品]
# Don't read the us.er's ~/.rh.osts and ~/.shosts files.
#Ig.noreRhosts yes 婚庆
# For this to work you will also. need host keys in /etc/ss.h/ssh_known_hosts虚拟主机
#Rhosts.RSAAuthenticat.ion no 外汇
# simil.ar for pro.tocol version 2[成人用品]
#HostbasedAuthe.ntication. no 汽车
# Change to yes if you don't trust .~/.ssh/known_ho.sts for 婚庆
# RhostsRSAAuthentication and .HostbasedAuthen.tication 鲜花
#.IgnoreUserKnownHosts no 健康
# To di.sable tunneled clear text passwor.ds, change to no here!虚拟主机
#Password.Authent.ication yes 杀毒
#PermitEmptyPasswords .no 电子
# Change t.o no. to disable s/key passwords.
#Challe.ngeResponseAuthenti.cation yes电脑
# Kerberos op.tions
#Ker.berosAuthenticat.ion no电脑
#KerberosOrLocalPasswd .ye.s教育
#Ker.berosT.icketCleanup yes.
#A.FSTokenPassing no.
# Ker.beros TGT Passing only works with the AFS kaserv.er.
#KerberosTgtPa.ssing no--- 印刷
# S.et this to 'yes' to enable PAM keyboard-interact.ive authentication.
# Warning: enabling this may bypass the. .setting of 'PasswordAuthentication'.
#PAMAuth.enticationViaKbdInt y.es 建材
#X11Forwarding. no--- 印刷
X11Forwardi.ng yes电影
#X1.1DisplayOffset 10(广告)
#X1.1UseLocalhost yes.
#PrintMotd yes
#PrintLastLo.g yes.
#KeepAlive yes
#UseLogin no
#.UsePrivilege.Separation yes--------------彩票
#Compressi.on yes.
#M.axStartups 10.
# no defa.ult banner path 健康
#Banner /some./path服务器
#.VerifyReverseMapping no( 游戏 )
# .override default .of no subsystems.
Subsystem sftp /usr/libexe.c/openssh/sftp-server.[成人用品]