LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-29-2012, 01:52 PM   #1
kevinamygrayson
LQ Newbie
 
Registered: Apr 2012
Location: Decatur, Ga
Distribution: Slackware 13.37, and others
Posts: 20

Rep: Reputation: Disabled
Editing network settings in a fresh CentOS 6.2 install


After installing CentOS 6.2 yesterday, I've been having trouble figuring out the network settings so that I can access the machine through putty or secure ssh. I edited the /etc/sysconfig/network-scripts/ifcfg-ethlo in vi to give the machine a static ip address (192.168.1.3) and entered the netmask as 255.255.255.0 and set the router's ip as NETWORK=192.168.1.1 (which I got from my router).

I have access to the internet (I'm using the machine to type this) but can't seem to get access through ssh using port 22. I try to open the session, and just get a blank screen. I'm aware that I have probably missed something simple, but the answers I'm getting from various wiki's aren't providing any help, as they assume a level of knowledge I lack. Anyone have any thoughts?

I would prefer to make any edits using the command line and vi, as I am doing this to learn. Thanks in advance.
 
Old 04-29-2012, 02:04 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Is sshd installed? If it's installed, is it active as a service on
all runlevels greater 1?


service sshd status
chkconfig sshd



Cheers,
Tink
 
1 members found this post helpful.
Old 04-29-2012, 02:13 PM   #3
kevinamygrayson
LQ Newbie
 
Registered: Apr 2012
Location: Decatur, Ga
Distribution: Slackware 13.37, and others
Posts: 20

Original Poster
Rep: Reputation: Disabled
ok ran service sshd status

openssh-daemon is stopped

is there a file I need to edit, and if so, where is it's directory?
 
Old 04-29-2012, 02:15 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Try running:

service sshd start

To make it run automatically on boot:

chkconfig sshd on

You might need to install chkconfig via yum; I forgot if it comes standard.
 
1 members found this post helpful.
Old 04-29-2012, 02:44 PM   #5
kevinamygrayson
LQ Newbie
 
Registered: Apr 2012
Location: Decatur, Ga
Distribution: Slackware 13.37, and others
Posts: 20

Original Poster
Rep: Reputation: Disabled
chkconfig was installed and sshd is now enabled at startup (checked via reboot and then running service sshd status as root). Went back to my desktop machine and attempted to log in through putty and secure ssh to no avail. Both connections timed out. When I edited the network settings via /etc/sysconfig/network-scripts/ifcfg-ethlo I was expecting to see the file as ethO rather than ethlo. Is it possible that I need to create the ethO file, or could it be that I don't have the right shell set up for remote connections? not sure where to go from here.
 
Old 04-29-2012, 03:09 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Sorry, didn't read that quite right ... ethlo is the loop-backinterface, it has no
physical media attached, so it's not surprising the box is unreachable.

What type of network card does it have?
lspci | grep -i net

What modules are loaded?
lsmod
 
1 members found this post helpful.
Old 04-29-2012, 03:15 PM   #7
kevinamygrayson
LQ Newbie
 
Registered: Apr 2012
Location: Decatur, Ga
Distribution: Slackware 13.37, and others
Posts: 20

Original Poster
Rep: Reputation: Disabled
OK, the wireless is not in use, I'm wired into the router. wasn't sure which modules you were looking for, so here's all of them. Thanks for your patience.

01:05.0 Network controller: Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller (rev 02)
01:09.0 Ethernet controller: Broadcom Corporation BCM4401 100Base-T (rev 01)

fuse 55994 0
autofs4 20825 3
sunrpc 197985 1
bnx2fc 107571 0
cnic 45323 1 bnx2fc
uio 8366 1 cnic
fcoe 17372 0
libfcoe 33413 2 bnx2fc,fcoe
8021q 18925 0
garp 5927 1 8021q
libfc 92030 3 bnx2fc,fcoe,libfcoe
stp 1589 1 garp
scsi_transport_fc 40950 3 bnx2fc,fcoe,libfc
llc 4354 2 garp,stp
scsi_tgt 9997 1 scsi_transport_fc
p4_clockmod 3161 0
ipt_REJECT 1931 2
nf_conntrack_ipv4 7694 2
nf_defrag_ipv4 1039 1 nf_conntrack_ipv4
iptable_filter 2173 1
ip_tables 9567 1 iptable_filter
ip6t_REJECT 3987 2
nf_conntrack_ipv6 7207 2
nf_defrag_ipv6 9873 1 nf_conntrack_ipv6
xt_state 1064 4
nf_conntrack 65524 3 nf_conntrack_ipv4,nf_conntrack_ipv6,xt_state
ip6table_filter 2245 1
ip6_tables 10867 1 ip6table_filter
ipv6 264641 34 cnic,ip6t_REJECT,nf_conntrack_ipv6,nf_defrag_ipv6
uinput 6244 0
ppdev 7361 0
parport_pc 19342 0
parport 30853 2 ppdev,parport_pc
arc4 1151 2
ecb 1613 2
b43 181639 0
mac80211 130488 1 b43
cfg80211 117703 2 b43,mac80211
rfkill 15242 2 cfg80211
microcode 12152 0
b44 26111 0
mii 4315 1 b44
ssb 47680 2 b43,b44
mmc_core 61346 2 b43,ssb
dcdbas 7095 0
sg 24612 0
snd_intel8x0 24345 2
snd_ac97_codec 95768 1 snd_intel8x0
ac97_bus 968 1 snd_ac97_codec
snd_seq 45509 0
snd_seq_device 5220 1 snd_seq
snd_pcm 66419 2 snd_intel8x0,snd_ac97_codec
snd_timer 17758 2 snd_seq,snd_pcm
snd 51724 10 snd_intel8x0,snd_ac97_codec,snd_seq,snd_seq_device,snd_pcm,snd_timer
soundcore 6486 1 snd
snd_page_alloc 7042 2 snd_intel8x0,snd_pcm
i2c_i801 9531 0
iTCO_wdt 10854 0
iTCO_vendor_support 2408 1 iTCO_wdt
ext4 331581 2
mbcache 5976 1 ext4
jbd2 73586 1 ext4
sr_mod 14245 0
cdrom 34094 1 sr_mod
sd_mod 35435 3
crc_t10dif 1217 1 sd_mod
pata_acpi 2513 0
ata_generic 2805 0
ata_piix 19202 2
i915 481293 2
drm_kms_helper 28144 1 i915
drm 185516 3 i915,drm_kms_helper
i2c_algo_bit 4690 1 i915
i2c_core 25825 5 i2c_i801,i915,drm_kms_helper,drm,i2c_algo_bit
video 16720 1 i915
output 1805 1 video
dm_mirror 11678 0
dm_region_hash 9737 1 dm_mirror
dm_log 8546 2 dm_mirror,dm_region_hash
dm_mod 67533 8 dm_mirror,dm_log
 
Old 04-29-2012, 03:22 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
OK, that matches up nicely:
b44 26111 0 is the wired adapter.

Now, w/o any other parameters, what does
ifconfig
have to say?


Cheers,
Tink
 
1 members found this post helpful.
Old 04-29-2012, 03:27 PM   #9
kevinamygrayson
LQ Newbie
 
Registered: Apr 2012
Location: Decatur, Ga
Distribution: Slackware 13.37, and others
Posts: 20

Original Poster
Rep: Reputation: Disabled
eth0 Link encap:Ethernet HWaddr 00:0D:56:C9:34:A6
inet addr:192.168.1.102 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20d:56ff:fec9:34a6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5259 errors:0 dropped:0 overruns:0 frame:0
TX packets:4615 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3190542 (3.0 MiB) TX bytes:869691 (849.3 KiB)
Interrupt:17

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:578 (578.0 b) TX bytes:578 (578.0 b)

wlan0 Link encap:Ethernet HWaddr 00:16:01:7D:64:33
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
 
Old 04-29-2012, 03:33 PM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Hmmm ... no ethlo, eth0 up and running, but w/ a different IP than you believe
to have set ... try ssh'ing to *.102 ;}

Guess you will need to manually create ethcfg-eth0 after all ...



Cheers,
Tink
 
Old 04-30-2012, 11:39 AM   #11
kevinamygrayson
LQ Newbie
 
Registered: Apr 2012
Location: Decatur, Ga
Distribution: Slackware 13.37, and others
Posts: 20

Original Poster
Rep: Reputation: Disabled
ok, ran vi /etc/sysconfig/network-scripts/ifcfg-eth0

and added the following as content of the file:

DEVICE=eth0
IPADDR=192.168.1.3
NETMASK=255.255.255.0
BROADCAST=192.168.0.255
ONBOOT=yes
BOOTPROTO=none
NETWORK=192.168.1.1

then ran ifconfig
eth0 Link encap:Ethernet HWaddr 00:0D:56:C9:34:A6
inet addr:192.168.1.102 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20d:56ff:fec9:34a6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:34857 errors:0 dropped:0 overruns:0 frame:0
TX packets:12806 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:17757122 (16.9 MiB) TX bytes:2198185 (2.0 MiB)
Interrupt:17

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4854 errors:0 dropped:0 overruns:0 frame:0
TX packets:4854 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1656642 (1.5 MiB) TX bytes:1656642 (1.5 MiB)

wlan0 Link encap:Ethernet HWaddr 00:16:01:7D:64:33
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

I will now try remote access again, and let you know.
 
Old 04-30-2012, 11:43 AM   #12
kevinamygrayson
LQ Newbie
 
Registered: Apr 2012
Location: Decatur, Ga
Distribution: Slackware 13.37, and others
Posts: 20

Original Poster
Rep: Reputation: Disabled
Just noticed that it still lists IP address as 192.168.1.2, despite my change. I tried using the .2 address to log in and got nowhere. I'll try rebooting.
 
Old 04-30-2012, 12:31 PM   #13
kevinamygrayson
LQ Newbie
 
Registered: Apr 2012
Location: Decatur, Ga
Distribution: Slackware 13.37, and others
Posts: 20

Original Poster
Rep: Reputation: Disabled
aaaand I succeeded in killing my connection to the net. ssh connection still times out. On the upside, the ip address shows the .3 now in if config...
 
Old 04-30-2012, 01:47 PM   #14
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
May I ask why you chose "none" instead of "static" for
the BOOTPROTO? Also, after the reboot, what does ifconfigs
entire output look like?

I also notice that you set your broadcast address to a different
subnet than what you and your router are on; might pay to change
that, too ...
 
1 members found this post helpful.
Old 04-30-2012, 02:58 PM   #15
kevinamygrayson
LQ Newbie
 
Registered: Apr 2012
Location: Decatur, Ga
Distribution: Slackware 13.37, and others
Posts: 20

Original Poster
Rep: Reputation: Disabled
I realized I had trashed the settings pretty badly, so I did a fresh install (the benefit of this being a learning machine is I don't have anything worth saving on it).

ran chkconfig sshd on

ran ifconfig
to get the current ip address. I can now get on with ssh. Now I just need to figure out where the file is where I set the static ip, because there is no /etc/sysconfig/network-scripts/ifcfg-eth0 file.

as for why I set up the file the way I did, I was guessing...badly.

Thanks again for your patience with this.
 
  


Reply



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
Fresh Linux (Debian and CentOS) install does not boot yoshiegg Linux - Newbie 4 10-09-2012 06:42 AM
After fresh install and reboot, i get a black screen! PLEASE HELP! CENTOS 5.5 patrick_004 Red Hat 3 03-08-2011 02:22 AM
yum update trouble - Fresh install of Centos 5.4 aries44475 Linux - Newbie 12 03-05-2010 09:51 AM
Ubuntu Edgy: fresh install last week, now can't change a load of settings. morrolan Linux - General 0 11-09-2006 11:12 AM
Fresh install of RH9 for a newb user - incorrect display settings? utaeladil Linux - Hardware 2 09-18-2005 03:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:56 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration