Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Write an article for LinuxForums Today! Win Great Prizes!
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Linux Security > chroot and SSH

Forgot Password?
 Linux Security   Discussion about keeping your machines secure, and the crackers out.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds
Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 03-04-2004   #1 (permalink)
Linux Engineer
 
Join Date: Nov 2002
Location: Queens, NY
Posts: 1,319
Send a message via AIM to bpark
chroot and SSH

Does anyone have experience with chroot and SSH? I've managed to set mine up but it keeps denying me saying that my passwd is wrong.
__________________
The best things in life are free.
bpark is offline  



Reply With Quote
Old 03-04-2004   #2 (permalink)
Linux Guru
 
Join Date: Apr 2003
Location: London, UK
Posts: 3,284
Do you have the username/password your trying to login with in your CHROOTED copy of /etc/passwd & /etc/shadow files?
jasonlambert is offline   Reply With Quote
Old 03-04-2004   #3 (permalink)
Linux Engineer
 
Join Date: Nov 2002
Location: Queens, NY
Posts: 1,319
Send a message via AIM to bpark
Yes, I've restarted the server as well.

Does the group and gshadow file need to be existent as well? The only thing that came by default was the passwd and shadow wit the sshd user in both those files.
__________________
The best things in life are free.
bpark is offline   Reply With Quote
Old 03-04-2004   #4 (permalink)
Linux Guru
 
Join Date: Apr 2003
Location: London, UK
Posts: 3,284
do you have your chrooted server on a different port? if so, are you connecting to that port when you try to ssh in?

Anything with tcpwrappers? eg, have you been locked out by an entry in /etc/hosts.deny?

Jason
jasonlambert is offline   Reply With Quote
Old 03-04-2004   #5 (permalink)
Linux Engineer
 
Join Date: Nov 2002
Location: Queens, NY
Posts: 1,319
Send a message via AIM to bpark
As far as I can see, it's still on 22.

No TCP wrappers as far as I'm concerned. I was able to connect to a regular SSH server that I tried a few minutes ago. It's just this chrooted environment that keeps denying me.

I've copied one of the users entry from /etc/passwd and /etc/shadow to the chrooted environment files and restarted.

It looos like in both files /etc/passwd and the chrooted passwd file
Code:
joeuser:x:1099:1099:Joe Random User:/home/joe/./:/bin/bash
__________________
The best things in life are free.
bpark is offline   Reply With Quote
Old 03-04-2004   #6 (permalink)
Linux Guru
 
Join Date: Apr 2003
Location: London, UK
Posts: 3,284
the chrooted version of /bin/bash exists?
jasonlambert is offline   Reply With Quote
Old 03-04-2004   #7 (permalink)
Linux Engineer
 
Join Date: Nov 2002
Location: Queens, NY
Posts: 1,319
Send a message via AIM to bpark
Yes, it does with most other stuff.
__________________
The best things in life are free.
bpark is offline   Reply With Quote
Old 03-04-2004   #8 (permalink)
Linux Engineer
 
Join Date: Nov 2002
Location: Queens, NY
Posts: 1,319
Send a message via AIM to bpark
New Problem

I sovled the problem about the login issue. I need to copy the modular PAM files over since my the PAM modules are scattered.

I have a new problem though, whenever I try to start sftp, I get this error:
Code:
Request for subsystem 'sftp' failed on channel 0
Any ideas on what this means?
__________________
The best things in life are free.
bpark is offline   Reply With Quote
Old 03-05-2004   #9 (permalink)
Linux Engineer
 
Join Date: Nov 2002
Location: Queens, NY
Posts: 1,319
Send a message via AIM to bpark
Solved

With the help of a Linux guru that I met at this forum, the problem was resolved once again. It appears that the subsystem sftp-server was never copied into the chrooted environment so it wasn't able to launch sftp.
__________________
The best things in life are free.
bpark is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
A Newbie's Getting Started Guide to Linux
Learn the basics of the Linux operating systems. Get to know what it is all about, and familiarize yourself with the practical side. Basically, if you're a complete Linux newbie and looking for a quick and easy guide to get you started this is it.
subscribe
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 04:41 AM.






© 2000 - - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.1