Linux (none) SSH on Debian
Hello there!
I would really be thankful if somebody could just advise me what does the follwoing line mean. When I access my server via SSH I see it typed. Linux (none) 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 The part I am interested in is Linux (none). Does that 'none' mean that I do not have a hostname? But then when I type in the same SSH session the hostname -f or uname -n commands it returns my hostname OK and says that the hostname is fine and working. Would appreciate any suggestions at all. Many thanks in advance! |
probably related to /etc/issue. What is inside?
|
Quote:
Well, my /etc/issue has only one short line inside. It says the following Debian GNU/Linux 7 \n \l Does it help to identify the probelm? \n \l to be deleted? Thanks. |
...update... uname -a returns everything just perfectly fine as well, but any SSH new start up with absolutely any (existing) user name shows "Linux (none) ..and so on" at the very beginning...
|
see man issue and man getty. \n is the hostname for example. looks like other file is in use, you need to search it
|
Quote:
How do I look for that other file? I mean what do I have to look for? Debian/GNU? Excact wording Debian GNU/Linux 7 \n \l? Any tips on that? |
yes, I would try to construct the text you got based on getty and look for that string in /etc
something like this: Code:
Linux (none) 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 |
Quote:
|
The solution was as simple as it can only be! The point was in the motd script that simply did not start at boot time. As soon as I ran it manually first it all worked. Then I changed it to start at boot time.
Now some help for those who may get the same error. Run this from the commanad line sh motd.sh or bash motd.sh and all should be fine. Then change it to run at boot time like I did so that when you change anything and re-boot the settings come into effect. The place to check is: /etc/pam.d and then sshd file the lines to look for are: session optional pam_motd.so motd=/run/motd.dynamic noupdate session optional pam_motd.so # [1] You may comment out these two lines to get rid of any SSH banners at all or read the sshd file carefully for more information or go to /run/motd.dynamic to see the full picture and then take any further steps at your discretion. Hope it will help someone to fix it. The difference is that Debian Wheezy creates the hostname (uname -a) now dynamically therefore the name 'motd=/run/motd.dynamic noupdate' then stores it in /var/run/motd and then creates a symlink of it in /etc/motd. It's a bit confusing. The thing that helped me understand it was simply looking at the script's code as my background is more on a web-developing "side" ;) So here's the part of that code that might be useful to someone as well do_start () { # Update motd uname -snrvm > /var/run/motd.dynamic } do_status () { if [ -f /var/run/motd.dynamic ] ; then return 0 else return 4 fi } |
All times are GMT -5. The time now is 11:19 AM. |