Operating System - Tru64 Unix
1754362 Members
4840 Online
108813 Solutions
New Discussion юеВ

SCP Only between TRU64 Machines

 
Premjith Nair
Occasional Advisor

SCP Only between TRU64 Machines

I have configured scp from One TRU64 machine to another without prompting for Password. I want to restrict the user to use only scp command & should not be able to login using ssh interactively.

Though in the authorization file, the command restriction script is added, SSH@_ORIGINAL_COMMAND Environment Variable is not getting set when remote command is executed.

Anybody has done command restriction option using SSH2.
VMS is the best
3 REPLIES 3
Ivan Ferreira
Honored Contributor

Re: SCP Only between TRU64 Machines

You could add a line in the /etc/profile that checks if the UID match that specific user, then runs the exit command.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Aco Blazeski
Regular Advisor

Re: SCP Only between TRU64 Machines

HI Nair,

Set the /usr/bin/ssh-dummy-shell as default shell for the scp user.

/usr/bin/ssh-dummy-shell is for commercial version of ssh, which I believe you have on your system.

Regards,
Premjith Nair
Occasional Advisor

Re: SCP Only between TRU64 Machines

This is made working after adding
"command /usr/bin/sftp-server" in the authorization file.

Though the Man page shows the command syntax
as 'command="command", this was not working.

Thanks for your replies.

VMS is the best