Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, I have successfully configured a sshd server and got it running. The problem lies in the fact that whenever clients connect to it, they get the following output:
Last login: Tue Aug 9 12:29:58 2005 from 111.222.333.444
Environment:
USER=xxx
LOGNAME=xxx
HOME=/home/xxx
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
MAIL=/var/mail/xxx
SHELL=/bin/bash
SSH_CLIENT=111.222.333.444 3644 22
SSH_CONNECTION=111.222.333.444 3644 111.222.333.555 22
SSH_TTY=/dev/pts/0
TERM=xterm
xxx@hostname:~$
I would like to disable these variables from being displayed. I believe its a misconfiguration or similar problem with sshd because of the three SSH_ variables in the output. I doubt it is a bash related problem because when I log into the server via physical access (eg me sitting at the terminal) I dont get that output.
This is probably simply something I overlooked and if anyone knows how to do this, a response would greatly be appreciated. Thank you.
Maybe there is something causing this in /etc/ssh/environment (or /etc/environment, depending on install) or ~/.ssh/environment, OR ~/.sshrc. Or a conditional in the bash startup scripts.
Thanks for your reply Matir. I dont think its a problem with any of those scripts because i dont event have an /etc/environment or an /etc/ssh/environment on my system. Also no users have a .ssh directory in their home directory. I also checked /etc/profile and any user's .bashrc files and none call the 'env' or 'set' or any other command that would display the environment variables. In addition, this happens for all users, regardless of what is in their home (some users have no files in their directory).
I am really stumped on this one. Are there any other files that I need to check or commands to check for.
Any more suggestions would be appreciated. Thanks.
Once again thanks for your reply matir. I believe I found the source of the problem. It seems that the problem did not lie in sshd but in the client applications I was using to connect to the server. When doing my testing, I was connecting to the server via mindterm and putty, both of which are ssh clients for windows. I noticed that when in mindterm, I had the terminal set to emulate xterm, but when i changed it to emulate a different terminal, such as te standard linux terminal, the non-desired output was no longer displayed. To verify this, I logged into linux on my client machine (its a dual boot) and ssh'd from the command line, and achieved the desired result (eg. no envrionment output).
The thing that confuses me is that once I log into X, start up Xterm, and issue a ssh to my server I do not get the environment variable output. Possibly this is due to a different in versions between the xterms on my linux partition and the emulation that mindterm / putty runs. Im not sure exactly why this happens, and its not a complete explanation but its good enough for me for now. Thanks for your help Matir, and I hope this helps anyone in a similar situation in the future (it annoyed the crap out of me :-) )
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.