[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] Can SFTP do this



Bet you already considered this:
 $ sftp host1:dev/home/directory
 $ sftp host1:ga/home/directory
 $ sftp host:prod/home/directory

If the userid is shared, nothing will stop them from using cd to move
around.  I'd just script it.

OTOH, if the userids are different, then the HOME for that userid is the
default directory and you can set those to whatever you need, if the
repercussions for other things (like logins) isn't too bad.  You can
make different usernames map to a single userid.

Don't forget the -b option. Can be very helpful.

Don't really understand the question, but I'm slow that way.


On 10/10/2016 12:10 PM, Chuck Payne wrote:
> Ok,
> 
> I have a client that as one account. They want to be able that if they
> sftp what they want to do, if this account sftp from one of three
> host, that it connects to the correct to the correct home directory
> that matches the host,
> 
> ie..
> 
> devhost01 sftp to host1 connects to dev/home/directory
> 
> qahost01 sftp to host1 connects to qa/home/directory
> 
> prodhost01 sftp to host connects to prod/home/directory
> 
> host1 is the host running sshd
> 
> So is there way for sshd to see where the host is coming from and
> redirect it to the correct directory?
>