Calling all SUPERGEEKS! I need help with SSH log-in from PC to Mac

Joined
Mar 4, 2007
Messages
391
Reaction score
7
Points
18
Location
London, UK
Your Mac's Specs
Mac Book Pro. 2.3Ghz Intel Core i7 running OSX 10.14.6, 16GB Ram
Hi guys,
I'm attempting to access my Mac from a friends PC using SSH.
I've downloaded and installed Putty on the PC, then entered my Mac's address as:
ssh my name@my ip address
and\or
my name@my ip address (without the 'ssh')

I get a fairly quick Network Error: Connection timed out.

My Mac back home is configured with automatic DHCP, and I use DyNS to assign a permanent IP address online, which I'm pretty sure is different from the one my Mac has offered me in System Prefs. Could that be the problem? I haven't turned the Mac off since it offered me an IP address to connect to through SSH.
 
OP
Simbad54
Joined
Mar 4, 2007
Messages
391
Reaction score
7
Points
18
Location
London, UK
Your Mac's Specs
Mac Book Pro. 2.3Ghz Intel Core i7 running OSX 10.14.6, 16GB Ram
Yes, I turned SSH on, not sure about the firewall though. I think I turned it off, which I tend to do, but perhaps it's on. Is Putty a good client, or are there better ones?
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
Are you on the same sub-net as in xxx.yyy.zzz.A and xxx.yyy.zzz.B?
 
OP
Simbad54
Joined
Mar 4, 2007
Messages
391
Reaction score
7
Points
18
Location
London, UK
Your Mac's Specs
Mac Book Pro. 2.3Ghz Intel Core i7 running OSX 10.14.6, 16GB Ram
Are you on the same sub-net as in xxx.yyy.zzz.A and xxx.yyy.zzz.B?

Hmm, I'm afraid you've lost me there. I'm new to this SSH thing. I'm literally wanting to try to access my Mac online so as to learn how to have a Terminal session from afar.
 
Joined
Aug 15, 2007
Messages
12
Reaction score
0
Points
1
Click on the Apple on the top left -

System Preferences > Sharing > Remote Login

Firewall Tab

Poke Around... Do you have a router? You probably need to open the port on it
 
OP
Simbad54
Joined
Mar 4, 2007
Messages
391
Reaction score
7
Points
18
Location
London, UK
Your Mac's Specs
Mac Book Pro. 2.3Ghz Intel Core i7 running OSX 10.14.6, 16GB Ram
Click on the Apple on the top left -

System Preferences > Sharing > Remote Login

Firewall Tab

Poke Around... Do you have a router? You probably need to open the port on it

Thanks for the response. I'm nowhere near my Mac, hence the attempt to access it from afar. I don't have a router anyway, just a cable modem. I've turned on remote login already, but I fear it has something to do with my dynamic IP address.
 
Joined
Aug 15, 2007
Messages
12
Reaction score
0
Points
1
Dynamic or Static I.P. addresses, it does not matter. Unless you're trying to ssh into a URL domain where the mac hosts it, which I doubt.

The only thing I can think of is that the ssh port is blocked where your mac resides..

I dont have enough information about your setup, your mac is afar, ok, but where? Is it behind routers where it is? What is the setup, wherever your mac is. Where the fuc.k is it at? Need more info, I can't help you.
 
OP
Simbad54
Joined
Mar 4, 2007
Messages
391
Reaction score
7
Points
18
Location
London, UK
Your Mac's Specs
Mac Book Pro. 2.3Ghz Intel Core i7 running OSX 10.14.6, 16GB Ram
Hmm, ok. My Mac is at Home, Wirelessly connected to a cable Modem. That's the set up. There is nothing else. It's in Paris, I'm in the south of France. On my mates PC. When I turned on remote login, i was given the ip address to access, in terminal, in the form I wrote in my first post. Sorry, but that's the setup.
When i open Putty t asks me to enter the address, then it has a box for the port, which is already filled in with 22.
IS that the standard access port into a Mac? Perhaps that needs changing.
I appreciate the help.
 
Joined
Sep 13, 2006
Messages
3,570
Reaction score
470
Points
83
Location
Colorado
Your Mac's Specs
Mac's
If your user name is "Simbad".... and your IP is 12.123.1.123, you would open Putty and in the "address" Field type: [email protected] ***Note: The user name IS cAsE sensitive.... Then press ENTER. A new screen will pop-up asking for your password (the Simbad Admin password, which is also case sensitive).


1175517683_b3e262b3a5.jpg
 
Joined
Feb 9, 2005
Messages
842
Reaction score
10
Points
18
Hmm, ok. My Mac is at Home, Wirelessly connected to a cable Modem. That's the set up. There is nothing else. It's in Paris, I'm in the south of France. On my mates PC. When I turned on remote login, i was given the ip address to access, in terminal, in the form I wrote in my first post. Sorry, but that's the setup.
When i open Putty t asks me to enter the address, then it has a box for the port, which is already filled in with 22.
IS that the standard access port into a Mac? Perhaps that needs changing.
I appreciate the help.


My guess is that its an internal IP address that the Mac gave you (and you are infact behind a router also).

If thats the case you need to get your external IP address (that of your router). Next you need to set up port 22 to forward to the internal IP address of your Mac.

So for example your internal address is 192.168.1.xx then you would set up ports 22 - 22 on your router to forward to 192.168.1.xx


--------------------

Then you need to make sure that your external IP stays that way, you have two options.

Get a static IP address or use something like http://www.dyndns.com/ .
I'm using dynDNS and it works pretty good. It just gives you a host name that you can connect to rather than an IP... that way everytime your IP address changes, DynDNS updates it against the hostname.

I haven't had any problems with it yet.
 
OP
Simbad54
Joined
Mar 4, 2007
Messages
391
Reaction score
7
Points
18
Location
London, UK
Your Mac's Specs
Mac Book Pro. 2.3Ghz Intel Core i7 running OSX 10.14.6, 16GB Ram
My guess is that its an internal IP address that the Mac gave you (and you are infact behind a router also).

If thats the case you need to get your external IP address (that of your router). Next you need to set up port 22 to forward to the internal IP address of your Mac.

So for example your internal address is 192.168.1.xx then you would set up ports 22 - 22 on your router to forward to 192.168.1.xx


--------------------

Then you need to make sure that your external IP stays that way, you have two options.

Get a static IP address or use something like http://www.dyndns.com/ .
I'm using dynDNS and it works pretty good. It just gives you a host name that you can connect to rather than an IP... that way everytime your IP address changes, DynDNS updates it against the hostname.

I haven't had any problems with it yet.

Just to refer you to my first post, I am using DynDNS to supply a permanent IP, so I guess that is where the fault is, as I'm trying to connect to the internal address. I am definately not behind a router, it is just a Cable Modem, nothing more. Does my Aiport express count? I haven't needed to configure that for anything as far as I remember. Thanks for the help.
 
Joined
Sep 13, 2006
Messages
3,570
Reaction score
470
Points
83
Location
Colorado
Your Mac's Specs
Mac's
You are entering an "external IP" (NOT 192.168.X.X) into Putty correct???
 
OP
Simbad54
Joined
Mar 4, 2007
Messages
391
Reaction score
7
Points
18
Location
London, UK
Your Mac's Specs
Mac Book Pro. 2.3Ghz Intel Core i7 running OSX 10.14.6, 16GB Ram
it's in the form of "ssh [email protected]"
I think I need the address that DynDNS gives me, which is something starting with 83.X.X.X
 
Joined
Sep 13, 2006
Messages
3,570
Reaction score
470
Points
83
Location
Colorado
Your Mac's Specs
Mac's
When you visit whatsmyip does it show you the same 10.2.X.X IP address???

EDIT... I guess you would need to be at your home machine to do that. :(

I use Putty from a Thumbdrive plugged into a PC (multiple PC's) to SSH into my Mac and my Dreamhost server without any problems... It's odd that you are having an issue. Hopefully we can get it figured out.
 
Joined
Feb 9, 2005
Messages
842
Reaction score
10
Points
18
Just to refer you to my first post, I am using DynDNS to supply a permanent IP, so I guess that is where the fault is, as I'm trying to connect to the internal address. I am definately not behind a router, it is just a Cable Modem, nothing more. Does my Aiport express count? I haven't needed to configure that for anything as far as I remember. Thanks for the help.


The best way to know what IP address to use is by going to http://whatismyip.com/ on your mac. This is the address that DynDNS should be using.

Also there are a few different settings on the DynDNS widget. In my case I use external because I want to direct it to my external address which then forwards the request I make on the port that I have configured to forward to my iMac (internal IP)

You should check the settings and use the one appropriate to your situation.

;)
 
Joined
Feb 9, 2005
Messages
842
Reaction score
10
Points
18
When you visit whatsmyip does it show you the same 10.2.X.X IP address???

EDIT... I guess you would need to be at your home machine to do that. :(

I use Putty from a Thumbdrive plugged into a PC (multiple PC's) to SSH into my Mac and my Dreamhost server without any problems... It's odd that you are having an issue. Hopefully we can get it figured out.



Got there before me! ;)
 
OP
Simbad54
Joined
Mar 4, 2007
Messages
391
Reaction score
7
Points
18
Location
London, UK
Your Mac's Specs
Mac Book Pro. 2.3Ghz Intel Core i7 running OSX 10.14.6, 16GB Ram
Hi guys, I really appreciate all this. As you have guessed I'm not at my Mac.:[
My DynDND widget has my external IP on it, so of course, all I need to do is sit down in Front of my Mac.

*Slight time break*

I've just got my external IP address by logging into my DynDNS account online.
There is also my host name in the form of name.gotdns.com

I tried just the IP address. No joy.
I tried ssh myusername@externalip.
No joy either.

Any ideas?
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top