LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Need help logging into my machine from another pc (https://www.linuxquestions.org/questions/linux-networking-3/need-help-logging-into-my-machine-from-another-pc-742507/)

kike_coello 07-24-2009 11:40 AM

Need help logging into my machine from another pc
 
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.

Enrique

repo 07-24-2009 11:44 AM

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

acid_kewpie 07-24-2009 11:56 AM

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.

kike_coello 07-24-2009 01:39 PM

To repo:

- 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.

Enrique

repo 07-24-2009 01:52 PM

Quote:

- 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...)

acid_kewpie 07-24-2009 02:42 PM

www.portforward.com IS what you need...

"I don't know how to make sure port 22 is open on the router or if its forwarded to PC1."


All times are GMT -5. The time now is 09:51 AM.