SFTP Jail With Sun SSH Not OpenSSH


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users SFTP Jail With Sun SSH Not OpenSSH
# 1  
Old 04-22-2010
SFTP Jail With Sun SSH Not OpenSSH

Hi all,

I have a Solaris 10 server with SUN_SSH_1.1 installed.

I want to restrict a user via SFTP to only be able to access one directory. I've written a little script in .profile which works perfectly for an ssh login but it appears sftp doesn't read the .profile file so it doesn't work.

I've read that you can use chroot with openSSH to achieve this, is it possible to do something similar with Sun_SSH_1.1?

Thanks in advance!
# 2  
Old 04-22-2010
Quote:
it appears sftp doesn't read the .profile file so it doesn't work.
That's because SFTP is a subsystem of SSH and not a login shell.

Starting on version 4.8p1 of OpenSSH you can use the "Match" conditional block along with the "ChrootDirectory" option.

BTW, chroot support was implemented in OpenSolaris but unfortunately it never saw the light in Solaris and as far as I know there are no plans to ever port it. (see this blog entry)

Your options:

-Replace SunSSH with OpenSSH
-Create and configure the chroot by hand

Have a look at this document -> Setup of a chroot'd SFTP only server .

Last edited by verdepollo; 04-22-2010 at 11:26 AM..
# 3  
Old 04-22-2010
Also look at MySecureShell - Index , I used it with Winscp and it was relatively painless.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

sftp jail chroot env setup

Hi I need a specific user to be able to sftp to a server and get files from a specific location. The location is not the users home dir, i don't want the user to be able to view anything else apart from the files in that area. e.g ftp file are is - /logging/phplogs e.g user home is... (1 Reply)
Discussion started by: duckeggs01
1 Replies

2. UNIX for Advanced & Expert Users

ssh jail user

I have a developer that needs ssh access to a server to get to a specific directory. I want to restrict them to that directory. I've tried to set their shell as rksh which does jail them but only if they are using ssh from another unix system. If they are using putty or winscp they can still... (2 Replies)
Discussion started by: toor13
2 Replies

3. Debian

SSH chroot jail problems

Firstly Hi everyone :) I setup SFTP and SSH jail using this tutorial: http://www.howtoforge.com/chrooted-ssh-sftp-tutorial-debian-lenny SFTP jail works however now when I try to SSH it accepts my password and then just goes to a blank screen. Type any command and the shell session is... (11 Replies)
Discussion started by: pokey144
11 Replies

4. UNIX for Dummies Questions & Answers

SFTP with OpenSSH

Hi All, I am using SFTP command to download some files from a remote server. My both the servers are SFTP enabled. I am sending SFTP request to a Windows server from my Linux server via openSSH. and i have already exchanged publickey between both the servers. But still remote server is asking... (1 Reply)
Discussion started by: vipparlas
1 Replies

5. UNIX for Advanced & Expert Users

Password Aging with Openssh 5.2 SFTP Subsystem Jail

All, I enabled PAM and aged a password, but when I login it asks me for the current password then says password unchanged after entering the current password. Is this a bug? My security dept is going to want me to enable password aging and I'm stuck! Any help on what the issu is? ... (6 Replies)
Discussion started by: markdjones82
6 Replies

6. Solaris

Please help me.. connection failed between OpenSSH-3.8.1 to Sun SSH-1.1

hi All, We tried to establish a connection from OpenSSH3.8.1 running on Windows Box to SunSSH-1.1 running on Solaris 10. Please see the debug statements. C:\Documents and Settings\sadmin\.ssh>ssh sadmin@10.4.3.8 -v -v -v OpenSSH_3.8.1p1, OpenSSL 0.9.7d 17 Mar 2004 debug1: Reading... (2 Replies)
Discussion started by: venusunil
2 Replies

7. UNIX for Dummies Questions & Answers

OpenSSH incompatibility with Sun SSH ??

I am using OpenSSH on my sun servers. There is another suite of sun servers attempting to SSH into my machines. I am running ssh -vv: OpenSSH_4.4p1, OpenSSL 0.9.8d 28 Sep 2006 the other guy is running the sun version of ssh (i don't know what/if any differences there are between... (7 Replies)
Discussion started by: EWTGPAC
7 Replies

8. UNIX for Dummies Questions & Answers

Question about Openssh and sftp

I have to create an automated sftp job on an AIX box. The sftp command doesnt work. Do I need to install the openssh package in order to be able to invoke the sftp command? (2 Replies)
Discussion started by: NycUnxer
2 Replies

9. Solaris

password less login from openssh to SSH Secure Shell 3.0.1 Sun solaris 7

Hi, I would like to login from a Sun server running ssh: Sun_SSH_1.1, SSH protocols 1.5/2.0, OpenSSL 0x0090704f to ssh: SSH Secure Shell 3.0.1 on sparc-sun-solaris2.6 How can I achieve this? Thanks a million in advance (1 Reply)
Discussion started by: newbewie
1 Replies

10. UNIX for Dummies Questions & Answers

OpenSSH: SFTP X SCP

Hi all, I'm implementing some updates to my scripts that are now using ftp command. I was thinking about replace it by SFTP. Now I see that SCP does basically the same that SFTP. So... what are the differences between them? Thanks in advance... ;O) (1 Reply)
Discussion started by: alienET
1 Replies
Login or Register to Ask a Question