Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: ssh.net $Path not returning everything

$
0
0
With putty, you have an interactive shell, and many files are sourced (.bash_profile, .bashrc, .profile...).
With a non interactive shell (this is the case with CreateCommand()), a subset or none of those files are sourced, it depends on the registered shell with the user account, and the linux system (archlinux/debian).

What you can do, the most secure/sure way, is to edit your sshd_config file, add "PermitUserEnvironment yes", restart sshd, then create a file ~/.ssh/environment and set the environment variable you want.

If you can't do it, you can still prefix each command :
"pwd; echo $PATH" => "pwd; PATH=$PATH:/something echo $PATH"

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>