Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: OpenSSH: Dev

Fw: howto use chroot + sshd

 

 

OpenSSH dev RSS feed   Index | Next | Previous | View Threaded


kunwins at uplooking

Jun 7, 2009, 1:16 AM

Post #1 of 2 (966 views)
Permalink
Fw: howto use chroot + sshd

Hi everybody.
I got a problem here.

I want to use chroot + sshd service.
env:
RHEL 5.2

tail -1 /etc/pam.d/sshd
session required pam_chroot.so debug

tail /etc/security/chroot.conf
terry /users


ssh terry [at] 192 faile
tail /var/log/secure

Jun 7 05:05:40 node1 sshd[5397]: pam_chroot(sshd:session): chroot(/users) succeeded <- chroot /users succeeded
Jun 6 21:05:40 node1 sshd[5397]: pam_unix(sshd:session): session closed for user terry
Jun 6 21:05:40 node1 sshd[5399]: pam_env(sshd:setcred): Unable to open config file: /etc/security/pam_env.conf: No such file or directory
Jun 6 21:05:40 node1 sshd[5397]: syslogin_perform_logout: logout() returned an error
Jun 6 21:05:40 node1 sshd[5397]: fatal: openpty returns device for which ttyname fails. <- but why can not get one tty shell ?
Jun 6 21:05:40 node1 sshd[5397]: error: chown 0 0 failed: No such file or directory
Jun 6 21:05:40 node1 sshd[5397]: error: chmod 0666 failed: No such file or directory

ls -l /users/dev/
total 0
srw-rw-rw- 1 terry root 0 Jun 7 04:56 log
crw-rw-rw- 1 terry root 1, 3 Jun 7 04:04 null
crw-rw-rw- 1 terry root 5, 2 Jun 7 04:58 ptmx
drwxrwxrwx 2 terry terry 0 Jun 7 04:55 pts
crw-rw-rw- 1 terry root 5, 0 Jun 7 04:31 tty
crw-r--r-- 1 terry root 1, 9 Jun 7 04:31 urandom
crw-rw-rw- 1 terry root 1, 12 Jun 7 04:31 zero

ls -l /user/dev/pts <- empty

mount
devpts on /users/dev/pts type devpts (rw,uid=500,gid=5,mode=666)


but use command " ssh terry [at] 192 bash -i " I can log into system . .but something wrong , scp command means unknow user 500.

please give me advances.

thank you very much.


Best Regards

Terry Tsang.
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev [at] mindrot
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev


djm at mindrot

Jun 8, 2009, 1:57 AM

Post #2 of 2 (912 views)
Permalink
Re: Fw: howto use chroot + sshd [In reply to]

On Sun, 7 Jun 2009, Terry Tsang wrote:

>
>
> Hi everybody.
> I got a problem here.
>
> I want to use chroot + sshd service.
> env:
> RHEL 5.2
>
> tail -1 /etc/pam.d/sshd
> session required pam_chroot.so debug

OpenSSH doesn't support pam_chroot. Use the sshd_config ChrootDirectory
option instead (requires a recent OpenSSH).

-d
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev [at] mindrot
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

OpenSSH dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.