Linux - Networking This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
03-20-2003, 03:43 PM
|
#1
|
Member
Registered: Feb 2003
Distribution: VectorLinux 5.1
Posts: 116
Rep:
|
Changed my hostname and broke sshd
I changed my hostname yesterday by editting the /etc/sysconfig/network file. I also, for good measure, made similar changes to /etc/hosts. (edit) I've since rebooted my machine.
Now, if I try to ssh into my machine, it says:
So it will ask for a password from a stranger, but close a legit connection right away. Maybe I missed a step somewhere when changing my hostname. Any thoughts?
Thanks,
Last edited by Itzac; 03-20-2003 at 05:48 PM.
|
|
|
03-20-2003, 04:47 PM
|
#2
|
Senior Member
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503
Rep:
|
This leads me to believe that your hostname is resolving to the correct ip address. Did you restart all the services that deal with this? This problem is a little vague so it could be a lot of things. Also check your tcpwrappers. Can you deduce anything from the log files(i.e. /var/log/secure)?
|
|
|
03-20-2003, 06:28 PM
|
#3
|
Member
Registered: Feb 2003
Distribution: VectorLinux 5.1
Posts: 116
Original Poster
Rep:
|
Attempting to connect doesn't seem to generate any messages in /var/log/secure, and things seem to match up from before and after the name change. Are there any other logs or config files I might check? Also how do I check my tcp wrappers?
I did 'ssh -v ...' to a computer I could connect to, and then back to mine. I logged the output and did a diff. The two are almost identical up until the line where the connection is accepted or closed. I'll try refreshing my sshd install.
|
|
|
03-20-2003, 06:35 PM
|
#4
|
Senior Member
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503
Rep:
|
hmmm...well tcpwrappers are in /etc/hosts.allow and /etc/hosts.deny . Check your hosts.deny file and see if you are denying access to ssh. I don't think thats the problem though.
Do you have a firewall running?
|
|
|
03-20-2003, 07:21 PM
|
#5
|
Member
Registered: Feb 2003
Distribution: VectorLinux 5.1
Posts: 116
Original Poster
Rep:
|
Refreshing the install fixed it. I think it may have been something else I did (tried to x-forward xscreensaver) that may have been silly. Thanks for your help though.
|
|
|
03-20-2003, 07:26 PM
|
#6
|
Member
Registered: Nov 2002
Distribution: A totally 133t distro :)
Posts: 358
Rep:
|
Post the output of:
ssh -v myname@myboxofwires.net
Youll probably have to remove the host keys from the old hostname at least and maybe the user keys too. It might be easier just to move the users .ssh dir to .sshold. That way youd have a backup too.
|
|
|
03-20-2003, 08:32 PM
|
#7
|
Senior Member
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503
Rep:
|
Quote:
Refreshing the install fixed it.
|
What did you do re-install sshd?
|
|
|
03-23-2003, 06:54 PM
|
#8
|
Member
Registered: Feb 2003
Distribution: VectorLinux 5.1
Posts: 116
Original Poster
Rep:
|
Well, I found the openssl rpms on my install cds and ran
% rpm -Fvh openssl-sshd*.rpm
or whatever the rpm was called.
I rebooted the machine and that seemed to fix it. All is well, now I'm just closing up a few other security holes.
Thanks for all your help
|
|
|
All times are GMT -5. The time now is 09:25 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|