• port 22: Connection refused


    Hi

    Here I am trying to SSH into another computer on my LAN and keep getting this:

    ssh: connect to host 192.168.1.1 port 22: Connection refused
    

    The IP is not really this one but the poit is I keep getting this.
    All 3 computers have Antergos installed and I’ve tried disabling the firewall (the default we chose upon the installation process), adding the port 22 exception and even uninstalling the firewall. Nothing works.
    Funny enough, I can SSH into my Mac.

    Any ideas on how to open port 22?

    Thanks!

  • Did you intsall openssh?

    If so did you verify the ssh daemon is running?
    systemctl status sshd

    If it is inactive then try the following:
    sudo systemctl enable sshd
    sudo systemctl start sshd

    Link to Arch Wiki for SSH:
    https://wiki.archlinux.org/index.php/Secure_Shell

  • What’s in your /etc/hosts.allow and /etc/hosts.deny files?

  • @bmeister said in port 22: Connection refused:

    sudo systemctl enable sshd
    sudo systemctl start sshd

    Running this on both computers finally did the trick. FINALLY!!!

    Now, how do I do it automatically on every boot?
    (sorry for asking but I want to learn)

    Thanks!!!

  • @joaojotta Enable starts the process on boot and start starts the process only for the current session. :+1:

    I7 [email protected]/32GB Ram/3440 x 1440 + 1440p/EVGA 1080 FTW/512GB SSD/2TB HD/Antergos Base w/ Plasma

  • @joaojotta said in port 22: Connection refused:

    @bmeister said in port 22: Connection refused:

    sudo systemctl enable sshd
    sudo systemctl start sshd

    Running this on both computers finally did the trick. FINALLY!!!

    Now, how do I do it automatically on every boot?
    (sorry for asking but I want to learn)

    Thanks!!!

    Glad I could help! Just as Wyn stated, once you run the command sudo systemctl enable sshd ( which you already did ) the SSH daemon will automatically start after every reboot. So as of now SSH should always work for you.

  • Yeah… as someone who knows very little about these systems it’s actually confusing having to type the two but once you start thinking it becomes obvious that for a service to start it has to be enabled and also I believe I had to start both samba and smbd in order to share files in my home network.
    It just didn’t get clear that enable would make it system wide and not session wide.

    Thank you very much again!

Posts 7Views 1630
Log in to reply