LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 02-16-2013, 11:31 PM   #16
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,125

Original Poster
Rep: Reputation: 46

Quote:
Originally Posted by e5150 View Post
If you used netconfig to configure for the static ip 192.168.0.101 then /etc/hosts should contain a corresponding line. The setting you have seems to be what you get when setting up the network for dhcp with netconfig.
I never gave netconfig any IP. It does not ask for an IP. Honestly, I do not know where 192.168.0.101 came from. I edited /etc/hosts and put

192.168.0.1 SERVER_HOST.DN1 SERVER_HOST

After I booted, this line disappeared. [But I think 0.1 is reserved. Perhaps I should have write 192.168.0.2] Well, I think I'll continue studying networks before I go on with this after all.
 
Old 02-16-2013, 11:52 PM   #17
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,125

Original Poster
Rep: Reputation: 46
Something remarkable happened. I put the line

192.168.0.101 .........

not in the server's /etc/hosts but in the local host's. As a result, when I issued 'slogin SERVER_HOST' from the local host, I was asked for the password. So I had it all wrong!
 
Old 02-17-2013, 12:07 AM   #18
e5150
Member
 
Registered: Oct 2005
Location: Sweden
Distribution: Slackware
Posts: 74

Rep: Reputation: 41
If netconfig didn't ask for an IP adress, it's probably because you selected DHCP (or maybe networkmanager, I don't know how that one works). In that case SERVER_HOST would ask the router (whose ip probably is 192.168.0.1) for an ip, and SERVER_HOST would be given 192.168.0.101.

Putting "192.168.0.101 SERVER_HOST.DN1 SERVER_HOST" in /etc/hosts at "local host" basically tells "local host" that "whenever I want to talk to SERVER_HOST or SERVER_HOST.DN1 I should address my messages to 192.168.0.101." So that `slogin SERVER_HOST` works after this change was to be expected.
However if you're using DHCP there is no guaranty that SERVER_HOST always will have 192.168.0.101 as its ip.

There was a small discussion some time ago on the merits of static ip + /etc/hosts versus dhcp, might be of interest to you: http://www.linuxquestions.org/questi...ip-4175436549/
 
Old 02-17-2013, 12:24 AM   #19
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,125

Original Poster
Rep: Reputation: 46
I use DHCP because my ISP does not provide static IPs (I think). As to the rest, logging remotely from the server works fine, but doing it from the local host, the system asks for the password, OK, but then it says 'Permission denied. Please try again'.

Yes, I selected DHCP.
 
Old 02-17-2013, 12:42 AM   #20
e5150
Member
 
Registered: Oct 2005
Location: Sweden
Distribution: Slackware
Posts: 74

Rep: Reputation: 41
Well, it's only the router/modem that talks directly to your ISP (if I've understood your network correctly). The 192.168.0.x addresses are only visible to your computers, and can be set statically (if that is deemed to be desired).

As to the Permission denied, do you have a user with the same user name on SERVER_HOST as the user who is running `slogin SERVER_HOST` on "local host"? (If the user is root, maybe you have disable remote root logins (as you probably should), PermitRootLogin in /etc/ssh/sshd_config? Do you have any entries in /etc/hosts.deny?
/var/log/messages (or /var/log/syslog) on SERVER_HOST might have some information.
 
Old 02-17-2013, 01:21 AM   #21
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,125

Original Poster
Rep: Reputation: 46
When at the local host, I was always as root. Now I tried going to a console (virtual console in the same machine, the local host) where I am a regular user. I ran 'slogin SERVER_HOST' and this time I succeeded. In the server, in the file /etc/ssh/sshd_config I have

PermitRootLogin no

So there, in the local host, I can only remote login if I am a regular user. However from the server I can remotely login (into the local host) as root! So there is no symmetry. One of the machines is boss.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot connect to LANs - ifconfig and iwconfig show no devices spiderjim Linux - Networking 7 11-21-2009 03:10 AM
Script for IFCONFIG tht PING with destination ip address in same format pooppp Linux - Networking 1 07-31-2008 10:19 AM
slack 10.2 install ..missing things like ping,ifconfig techentral Slackware 8 01-15-2006 10:58 AM
connecting /sbin/ifconfig to bash command ifconfig flammable2 Fedora 4 11-12-2005 07:58 AM
using ping and ifconfig in C program Menestrel Programming 2 12-20-2004 08:52 AM


All times are GMT -5. The time now is 11:36 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration