I have a CentOS 5.7 web server, and I want to change the default place I land in when connecting using SSH.
Currently I land in /home/username, and I want to land in /home instead.
I've gone in as root and added PermitUserEnvironment yes to /etc/.ssh/sshd_config - and as I understand it this then sweeps the user's own ssh folder for an environment file. What I'm not sure about is exactly what I'm adding to this environment file, as export path=$PATH:$HOME doesn't seem to work, either here or in my .bashrc or .bash_profile files (which as I understand it wouldn't make a difference anyway as an SSH connection is a non-interactive shell?).
Thanks in advance.
usermodwhen changing anything concerning a user that writes to/etc/passwd, to prevent mistakes:usermod -d /home user. – laebshade Jan 09 '13 at 02:19.bashrcmade me facepalm. It's so simple and obvious, wish I had thought of it! Good job. Kudos! – cwallenpoole Feb 27 '17 at 13:47