Find the answer to your Linux question:
Results 1 to 4 of 4
I'm trying to connect to my home pc with ssh. I have road runner connected to a wireless router and then my pc connects to the router via a wireless ...
  1. #1
    Just Joined!
    Join Date
    Jun 2010
    Posts
    9

    ssh connectivity

    I'm trying to connect to my home pc with ssh.
    I have road runner connected to a wireless router
    and then my pc connects to the router via a wireless card.
    I can use the Internet from my pc.
    I also know sshd is running.
    I do a ifconfig to get the ip address.
    Then, nothing happens when I try to connect to this
    ip address via ssh from a remote pc.
    So, what's going on with this? How can I get ssh
    to connect to the home pc?

    thank you,
    Henry

  2. #2
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,562
    Hi Henry!

    Sounds to me that you need to forward port 22 from your router to your home machine. Look in "port forwarding" in your router and have port 22 configured to be forwarded to the Internal IP address of your home box... that is the same IP address your box gives you when you do ifconfig.

    Are you running this box dhcp (asking the router for an IP) or static (the machine tells the router what IP it is to have)? Obviously static is the best way to go inside your network. If trying to connect from outside your network, static is the way to go too as ISPs IP to you will change over time.

    Once port 22 is forwarded to the desired box, contact your network using the IP address assigned to you by your ISP. A quick way to find this out is to go to What Is My IP Address - Shows Your IP Address. Let's say your whatismyip address is given as: 123.45.67.8 and your username on the home ssh server is henry. From outside your network you'd do:
    Code:
    ssh henry@123.45.67.8
    The router will forward the request to the IP of the designated box and it will ask for your password.
    Last edited by Dapper Dan; 09-13-2010 at 12:14 PM.
    Linux Mint + IceWM Registered:#371367 New Members: click here

  3. #3
    Just Joined!
    Join Date
    Jun 2010
    Posts
    9

    10.09.15

    I'm not sure I understood the exact procedure for dhcp on fedora. I looked up PF on Internet
    and I found the followed (but it does not seem to work):
    Would you know how to fix this?

    H.

    #---------------------------------------------------------------
    # Allow previously established connections
    # - Interface eth0 is the internet interface
    #---------------------------------------------------------------

    iptables -A OUTPUT -o eth0 -m state --state ESTABLISHED,RELATED \
    -j ACCEPT

    #---------------------------------------------------------------
    # Allow port 80 (www) and 22 (SSH) connections to the firewall
    #---------------------------------------------------------------

    iptables -A INPUT -p tcp -i eth0 --dport 22 --sport 1024:65535 \
    -m state --state NEW -j ACCEPT

  4. #4
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,562
    I haven't used Fedora in a while so if you really do need to open port 22 on that box (and now I seem to remember that you indeed have to), the easiest way is to do it through it's utilities. From the command line:
    Code:
    su -
    input password, then:
    Code:
    system-config-firewall
    Or find it in administrative utilities. It should be intuitive enough to get you through opening port 22 on the box itself. If you need more, have a look at this page.
    Linux Mint + IceWM Registered:#371367 New Members: click here

Posting Permissions

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