LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-14-2006, 05:40 AM   #1
cantabile
LQ Newbie
 
Registered: Jan 2004
Posts: 28

Rep: Reputation: 15
weird sftp/rssh problem


Hi,

To make a long story short, here's how it goes :
I have created a chrooted environement for a user 'webmaster' in my server. I have generated a ssh key and am able to connect via ssh or sftp with this key to the user account when user shell is /bin/bash. Now, I would like to restrict the access to sftp, so I changed /etc/passwd line from


webmaster:x:1001:100::/home/webmaster/./home/webmaster/:/bin/bash

to

webmaster:x:1001:100::/home/webmaster/./home/webmaster/:/usr/bin/rssh


And in rssh.conf, I uncommented the desired lines :

allowscp
allowsftp
#allowcvs
#allowrdist
#allowrsync


Well, what was working previously doesn't any longer. And I can't figure out why...
Here's sftp -vvvv output (beginning truncated) :

Enter passphrase for key 'id_dsa':
debug1: read PEM private key done: type DSA
debug1: Authentication succeeded (publickey).
debug2: fd 4 setting O_NONBLOCK
debug3: fd 5 is O_NONBLOCK
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Entering interactive session.
debug2: callback start
debug2: client_session2_setup: id 0
debug1: Sending subsystem: sftp
debug2: channel 0: request subsystem confirm 1
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 131072
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: obuf empty
debug2: channel 0: close_write
debug2: channel 0: output drain -> closed
debug2: channel 0: rcvd close
debug2: channel 0: close_read
debug2: channel 0: input open -> closed
debug3: channel 0: will not send data after close
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
#0 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cfd -1)

debug3: channel 0: close_fds r -1 w -1 e 6 c -1
debug1: fd 0 clearing O_NONBLOCK
debug3: fd 1 is not O_NONBLOCK
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.3 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 1
Connection closed


The password is accepted but the connection is closed as soon as it is opened.
Do you understand why from these lines ?
I do not
 
Old 05-15-2006, 11:24 AM   #2
cantabile
LQ Newbie
 
Registered: Jan 2004
Posts: 28

Original Poster
Rep: Reputation: 15
Well, no idea anyone ?
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rssh/sftp chroot problem julz_51 Linux - Security 1 11-01-2005 03:50 PM
How do I use sftp to upload my web site? (no sftp tar command) johnMG Linux - Networking 6 06-21-2005 09:14 PM
sftp via rssh security questions plan9 Linux - Security 2 08-04-2004 10:38 AM
sftp with filenames and weird characters Nevion Linux - Software 1 05-28-2004 05:29 AM
Files truncated by sftp/sftp-server at 65kb gato Linux - Networking 1 12-18-2003 10:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration