LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-24-2009, 11:40 AM   #1
kike_coello
Member
 
Registered: Jul 2005
Location: maryland
Distribution: Ubuntu 9.04
Posts: 88

Rep: Reputation: 17
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
 
Old 07-24-2009, 11:44 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
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
 
Old 07-24-2009, 11:56 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 07-24-2009, 01:39 PM   #4
kike_coello
Member
 
Registered: Jul 2005
Location: maryland
Distribution: Ubuntu 9.04
Posts: 88

Original Poster
Rep: Reputation: 17
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
 
Old 07-24-2009, 01:52 PM   #5
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
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...)
 
Old 07-24-2009, 02:42 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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."
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Logging into Linux through SSH locks up machine bjh4 Linux - Newbie 3 10-16-2007 08:49 AM
Problems remotely logging into local machine bmccorm2 Linux - General 17 03-02-2006 08:14 AM
logging into remote machine with root id tuxfood Linux - General 2 08-08-2005 07:15 AM
logging from network to linux machine takes longer time R0nIn Linux - Newbie 2 05-06-2005 03:51 AM
Logging a Linux machine into a NT 2000 network edrabs Linux - Networking 1 08-26-2003 01:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration