Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2008
    Southwest Kansas

    [SOLVED] Questions about ssh

    I have been trying to learn how to use ssh for quite some time, and today I finally got a little bit more headway, but something rather bizaar happened...

    Ok, here's what I have running...
    Computer A. Zenwalk 5.2
    Computer B. Zenwalk 5.2 / Slackware 12.2
    Both wirelessly connected to a wireless router.

    I had gotten A to connect to B via ssh when I had Slackware running on B, but however, I could not connect Slackware to Zenwalk, the ssh_config files are identical to each other, so there shouldn't be any problems, all hosts files in /etc are identical, too. However, I would get "connection refused" if I tried to connect the Slackware system to Zenwalk.

    Now I had rebooted B and loaded into Zenwalk, now A gave me this message
    Someone could be eavesdropping on you right now (man-in-the-middle attack)!
    It is also possible that the RSA host key has just been changed.
    The fingerprint for the RSA key sent by the remote host is
    <Some number here>
    Please contact your system administrator.
    Add correct host key in /home/charles/.ssh/known_hosts to get rid of this message.
    Offending key in /home/charles/.ssh/known_hosts:1
    RSA host key for <Comp B's IP> has changed and you have requested strict checking.
    Host key verification failed.
    <Edit 2, now I'm recieving this same message when I try to log onto the slackware machine. Just removed the file ~/.ssh/known_hosts and now it works.>

    Which I presume this is just because Zenwalk uses a different RSA host key.

    Anyway, if it can't be explained easily, could someone tell me exactly what do I need to search for and what files I would need to look at or what man pages I need to view? As I have said I've been trying to do this for quite some time and I haven't found much in the way of help on it in anything ssh related...



    Also, I have a domain name set up, but can't use it when I do connect either ftp or ssh, rather I have to use the IP addresses, neither can I use the host names of the computers to connect to each other...What information out there would help with this, too?

  2. #2
    First the error message is normal and you get it the first time you log into a new machine.
    For the connection refused problem, you can check to see if sshd is running. It is the background daemon that allows remote users to login through ssh.
    To check if its running get a root terminal and then type
    #ps ef | grep sshd
    if you see an sshd process then you know its running, but if you don't then you need to start it.
    I'm not sure where the starting script is on Zenwalk, but often times it will be in
    /etc under the initialization scripts. Otherwise try looking for a system startup menu and add sshd to it.
    Its worth at least checking this first since its an easy fix.

  3. #3
    Just Joined!
    Join Date
    Sep 2008
    Southwest Kansas
    Thanks, that was it.

    However, I have never seen anyone use ps before, I'll have to look into it. When I used it I got a huge list of things where as any time I've used | grep ??? in the past I would only get things that would have the name ???. I use htop or top mostly.

    Strangely enough, too. Instead of running sshd which Slackware does, Zenwalk runs a script for the avahidaemon
    if [ -x /etc/rc.d/rc.sshd ]; then
       cp "$avahidir/disabled/ssh.service" "$avahidir/ssh.service"
       cp "$avahidir/disabled/sftp-ssh.service" "$avahidir/sftp-ssh.service"
    I just added "etc/rc.d/rc.sshd start" after the last cp in rc.avahidaemon file and chmodded the rc.sshd file that exists on Zenwalk. Rebooted and it worked.

    Thankfully it was an easy one, ha ha...

    Thanks a lot...

    Sheesh, I just started X on Slackware and loaded Opera and poof right there in front of my face was Well, at least I was on the right track, even though I didn't know what that meant last night...Now I do...

  4. $spacer_open
  5. #4
    I'm glad that was it, its always the first thing I check if my ssh fails since I'd had the problem of sshd not being started by default as well, before I really knew what it was or how to go about starting it.
    I believe it was on Zenwalk aswell.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts