Results 1 to 1 of 1
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Dec 2010
set environment variable for non interactive ssh login
I am facing one problem regarding ssh login and setting environment variable
i have written $HOME/.ssh/environment file
and ls-l /usr/bin/restricted is empty
also i have set the PermitUserEnvironment yes in /etc/ssh/sshd_config file
and restarted sshd process
when i perform ssh <username>(at the rate of)host 'command'
for example ssh user(at the rate of)<ip> 'ls -lart'
it is executing the command but as the path is /usr/bin/restricted it must not get executed . but when i do
ssh user(at the rate of)<ip> 'echo $PATH' --- it shows the path as /usr/bin/restricted
i want to restrict certain command thru non interactive ss login plzz tell me what is the issue with this
and how this can be solved
Last edited by Piyu_86; 12-13-2010 at 12:04 PM. Reason: title not proper