Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Nov 23, 2010 10:42 am 
Offline
Senior Newbie

Joined: Tue Nov 23, 2010 10:18 am
Posts: 7
I am getting Permission Denied when I try to SSH in with a password.

I was tweaking the /etc/ssh/sshd_config file to set up SFTP for a non root user. Then suddenly my SSH access vanished.

If I log into the LISH console then ssh in as root with password, I can get in. So the password is correct.

Below are the uncommented lines in /etc/ssh/sshd_config in case that helps.

Code:
Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
UsePrivilegeSeparation yes
KeyRegenerationInterval 3600
ServerKeyBits 768
SyslogFacility AUTH
LogLevel DEBUG
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
PasswordAuthentication yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
AcceptEnv LANG LC_*
Subsystem sftp internal-sftp
UsePAM yes
AllowUsers ftponly
AllowGroups ftpusers
Match Group ftpusers
  ChrootDirectory %h
  X11Forwarding no
  AllowTcpForwarding no
ForceCommand internal-sftp


I've also done /etc/init.d/ssh restart to no effect.

Any ideas appreciated. Distro is Debian (Lenny).


Top
   
 Post subject:
PostPosted: Tue Nov 23, 2010 11:41 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Add root to AllowUsers ftponly and restart ssh

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Tue Nov 23, 2010 4:28 pm 
Offline
Senior Member
User avatar

Joined: Tue Nov 24, 2009 1:59 pm
Posts: 362
Also,
PermitRootLogin yes
may be necessary. It was the default, not sure if still is.
May I ask why do you need to ssh in as root, instead of as some other username and then su?

_________________
rsk, providing useless advice on the Internet since 2005.


Top
   
 Post subject:
PostPosted: Tue Nov 23, 2010 9:01 pm 
Offline
Senior Newbie

Joined: Tue Nov 23, 2010 10:18 am
Posts: 7
EDIT: Decided to rebuild the box with admin user for root stuff so life is sweet again.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group