Linux.ChinaUnix.net
ChinaUnix | Linux首页 | 新闻 | 博客 | 文章 | 专栏 | 新手 | 方案 | 图书 | 下载 | 人才 | 手册 | wiki | 搜索     
Linux论坛
  会员: 密码: 免费注册 | 忘记密码 | 会员登录 | 搜索



ssh无法登录
首页 » CU论坛 » Linux » 汇总贴列表 » 嵌入式开发 »  
[打印] [订阅] [收藏] [本帖文本页] [推荐此主题给朋友,立即获积分]
qks5201314
精灵



CU编号: 653894
注册:2007-12-13
最后登录: 2009-06-07
帖子:214
精华:0

可用积分:315 (白手起家)
信誉积分:0
专家积分:0 (本版:0)
空间积分:0
推广积分:0

状态:...离线...

[个人空间] [短信] [博客]


1楼 发表于 2008-11-18 08:55 
请教朋友们一个问题:
以前在WIN下用putty工具的SSH登录linux服务器,用户名是root,登录使用正常;
现在想再添加一个普通用户,用户名为qks,现在samba服务可以用此用户名进行登录了,但是putty根据的ssh却无法用此用户名登录,
输入密码后提示"Access denied";请朋友们帮忙分析下是什么原因引起的;

thanks in advance



您对本贴的看法:鲜花[0] 臭蛋[0]
聆听风雨
骑士




CU编号: 421588
注册:2006-5-24
最后登录: 2008-12-05
帖子:65
精华:0

可用积分:81 (白手起家)
信誉积分:100
专家积分:0 (本版:0)
空间积分:0
推广积分:0

状态:...离线...

[个人空间] [短信] [博客]


2楼 发表于 2008-11-19 10:46 
貌似是默认被拒绝了吧!!



您对本贴的看法:鲜花[0] 臭蛋[0]

__________________________________

Welcome To My Blog : http://www.52listen.cn
qks5201314
精灵



CU编号: 653894
注册:2007-12-13
最后登录: 2009-06-07
帖子:214
精华:0

可用积分:315 (白手起家)
信誉积分:0
专家积分:0 (本版:0)
空间积分:0
推广积分:0

状态:...离线...

[个人空间] [短信] [博客]


3楼 发表于 2008-11-19 12:15 
回复 #2 聆听风雨 的帖子

那怎么解决呢?



您对本贴的看法:鲜花[0] 臭蛋[0]
版主 dreamice
广告杀手-精灵使
言多必失



CU编号: 562632
注册:2007-5-11
最后登录: 2009-07-05
帖子:3895
精华:37

可用积分:6236 (富足长乐)
信誉积分:110
专家积分:70 (本版:5)
空间积分:0
推广积分:31

状态:...离线...

[个人空间] [短信] [博客]


4楼 发表于 2008-11-19 16:56 


QUOTE:
原帖由 qks5201314 于 2008-11-19 12:15 发表
那怎么解决呢?

改一下/etc/ssh/sshd_config这个文件:

现在说不清楚,你把你这个文件的内容贴出来我看看



您对本贴的看法:鲜花[0] 臭蛋[0]

__________________________________

Nothing is impossible!
qks5201314
精灵



CU编号: 653894
注册:2007-12-13
最后登录: 2009-06-07
帖子:214
精华:0

可用积分:315 (白手起家)
信誉积分:0
专家积分:0 (本版:0)
空间积分:0
推广积分:0

状态:...离线...

[个人空间] [短信] [博客]


5楼 发表于 2008-11-19 17:18 
回复 #4 dreamice 的帖子

#       $OpenBSD: sshd_config,v 1.75 2007/03/19 01:01:29 djm Exp $

# 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 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# Disable legacy (protocol version 1) support in the server for new
# installations. In future the default will change to require explicit
# activation of protocol 1
Protocol 2

# 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
SyslogFacility AUTHPRIV
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin yes
#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 yes
#PermitEmptyPasswords no
PasswordAuthentication yes

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

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

# GSSAPI options
#GSSAPIAuthentication no
GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
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 no
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
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

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

就是那么多的



您对本贴的看法:鲜花[0] 臭蛋[0]
版主 dreamice
广告杀手-精灵使
言多必失



CU编号: 562632
注册:2007-5-11
最后登录: 2009-07-05
帖子:3895
精华:37

可用积分:6236 (富足长乐)
信誉积分:110
专家积分:70 (本版:5)
空间积分:0
推广积分:31

状态:...离线...

[个人空间] [短信] [博客]


6楼 发表于 2008-11-19 17:29 
# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH  
SyslogFacility AUTHPRIV
#LogLevel INFO

改成====》
# Logging
# obsoletes QuietMode and FascistLogging
SyslogFacility AUTH
#SyslogFacility AUTHPRIV
LogLevel INFO

试一下。




本帖最近评分记录
bitmilong   2008-11-19 19:43  可用积分  +5   鼓励
您对本贴的看法:鲜花[0] 臭蛋[0]

__________________________________

Nothing is impossible!
版主 dreamice
广告杀手-精灵使
言多必失



CU编号: 562632
注册:2007-5-11
最后登录: 2009-07-05
帖子:3895
精华:37

可用积分:6236 (富足长乐)
信誉积分:110
专家积分:70 (本版:5)
空间积分:0
推广积分:31

状态:...离线...

[个人空间] [短信] [博客]


7楼 发表于 2008-11-19 17:50 
搞定了没有,拿烟的兄弟



您对本贴的看法:鲜花[0] 臭蛋[0]

__________________________________

Nothing is impossible!
qks5201314
精灵



CU编号: 653894
注册:2007-12-13
最后登录: 2009-06-07
帖子:214
精华:0

可用积分:315 (白手起家)
信誉积分:0
专家积分:0 (本版:0)
空间积分:0
推广积分:0

状态:...离线...

[个人空间] [短信] [博客]


8楼 发表于 2008-11-19 18:40 
回复 #7 dreamice 的帖子

不好意思,刚回家吃饭了,我把那几句改了下,然后在终端上执行service sshd restart 重新启动此服务成功后,
用putty的ssh,后添加的用户名登录还提示"Access denied";:(



您对本贴的看法:鲜花[0] 臭蛋[0]
版主 dreamice
广告杀手-精灵使
言多必失



CU编号: 562632
注册:2007-5-11
最后登录: 2009-07-05
帖子:3895
精华:37

可用积分:6236 (富足长乐)
信誉积分:110
专家积分:70 (本版:5)
空间积分:0
推广积分:31

状态:...离线...

[个人空间] [短信] [博客]


9楼 发表于 2008-11-19 20:54 
你把这几个都注释掉:
#PasswordAuthentication yes
#GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
#X11Forwarding yes

另外,把这个打开:
ListenAddress 0.0.0.0



您对本贴的看法:鲜花[0] 臭蛋[0]

__________________________________

Nothing is impossible!
vermouth   帅哥 (酒)
法师


CU奥运火炬传递手2008
CU编号: 668512
注册:2008-2-15
最后登录: 2009-07-04
帖子:5816
精华:0

可用积分:15262 (大富大贵)
信誉积分:30
专家积分:58 (本版:0)
空间积分:0
推广积分:0

来自:shanghai
状态:...离线...

[个人空间] [短信] [博客]


10楼 发表于 2008-11-20 00:42 
/etc/hosts.deny



您对本贴的看法:鲜花[0] 臭蛋[0]

__________________________________

大梦谁先觉?平生我自知,草堂春睡足,窗外日迟迟。
.

首页 » CU论坛 » Linux » 汇总贴列表 » 嵌入式开发 »

 


Copyright © 2001-2008 ChinaUnix.net All Rights Reserved     联系我们:

感谢所有关心和支持过ChinaUnix的朋友们    转载本站内容请注明原作者名及出处

京ICP证041476号


清除 Cookies - Linux时代 - Archiver - WAP - TOP

Processed in 0.053072 second(s), 6 queries , Gzip enabled