Find the answer to your Linux question:
Results 1 to 1 of 1
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2010

    set environment variable for non interactive ssh login

    hi all

    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 11:04 AM. Reason: title not proper

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts