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?
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