Linux - NetworkingThis 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.
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.
Hi guys, I wanted to know if you can help me with logging into my machine from another computer, like at a friend's house or on a laptop. I used t o be able to connect from home to my school using ssh so I kinda know how it works but now that I'm trying at home it doesn't work.
I have 2 computers at home that I'm using to try this out:
PC1 with ip:77.112.102.202 (example) and
PC2 which is the computer that I'm using to log into PC1.
What I type in is:
ssh enrique@77.112.102.202
Then I get this error message:
ssh: connect to host 77.112.102.202 port 22: Connection refused
This syntax is the same I used to use with my school account and worked, also I googled some examples and forums and people use the same. I believe my problem might be with the port. Can somebody tell me how to know which port to use?
And one more question: could I use ssh from a pc with Linux to log in to a machine with Windows?
Thanks. I don't know if this is the right forum to post this, I usually post in the Programming Forum, sorry.
Make sure the sshd is running on PC1
Make sure port 22 is open on the router, and forwarded to PC1
Make sure port 22 is open in the firewall at PC1
Make sure your provider doesn't block port 22
Well you would need to forward that port from your home router to the internal machine, assuming that's the standard LAN layout you use at home. check portforward.com for more info.
as for sshing to windows, sure, if that windows machine is running an ssh server.
- I don't know how to make sure sshd is running. Do I just add it to the services on startup?
- I don't know how to make sure port 22 is open on the router or if its forwarded to PC1. Which file do I have to modify or which command do I have to use to make sure port 22 is open?
- I don't know how to make sure port 22 is open in the firewall. I don't even think I have a firewall. I'm using Ubuntu Linux 9.04.
- I don't know whether my provider is blocking port 22. All I know is that I've got Comcast and don't really know why would they be blocking port 22 or any other.
Lol, sorry guys I'm a complete networking newb, lol. Please, I know you guys are not gonna guide me step by step so I would really appreciate a reference to get started or something to google. I checked out that page "www.portforward.com" and it's not what I need (sorry acid).
ps: Thanks for the replies, it seems you guys know your stuff but I don't understand it and would like to learn from zero. I know how to program and use Linux but when it comes to networking stuff, I'm completely lost.
- I don't know how to make sure sshd is running. Do I just add it to the services on startup?
open a terminal and type
Code:
ps ax | grep sshd
Quote:
- I don't know how to make sure port 22 is open on the router or if its forwarded to PC1. Which file do I have to modify or which command do I have to use to make sure port 22 is open?
Login to the router and see
Take a look at the post from acid_kewpie
Quote:
- I don't know how to make sure port 22 is open in the firewall. I don't even think I have a firewall. I'm using Ubuntu Linux 9.04.
open a terminal and type
Code:
telnet 127.0.0.1 22
Quote:
- I don't know whether my provider is blocking port 22. All I know is that I've got Comcast and don't really know why would they be blocking port 22 or any other.
Most providers block common ports (22,80,21,25...)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.