image
image
Ticket Options
Question Details
TICKET ARCHIVE -> Ssh Server Problem: Macmini Osx 10.4.2
haimmamou - Aug 4, 2005 - 4:14 am
image
image
hi,

i just can't setup my ssh server on my mac mini. working with osx 10.4.2 i just go through the settings part, activate remote login, that is ssh, then i look at the firewall settings saying it authorizes the ssh communication.

still can't connect, even from my own host.

i must have missed something,

any help ?!

thanks.

Haim
cavaughan - Aug 4, 2005 - 2:55 pm
image
image
Just out of curiousity. If you issue the following command:
/usr/sbin/sshd -i
thereby making sure sshd is running and then try to ssh into your host, what happens?

--------
Curtis Vaughan
cavaughan@gmail.com
haimmamou - Aug 7, 2005 - 7:41 am
image
image
this command only prints this line:

SSH-2.0-OpenSSH_3.8.1p1

and then don't return to bash. i have to hit enter to have this new line displayed:

Protocol mismatch.


then i tryed those ones.

i tryed just the following:
/usr/sbin/sshd
that returned those lines and returned to batch.
Could not load host key: /etc/ssh_host_key
Could not load host key: /etc/ssh_host_rsa_key
Could not load host key: /etc/ssh_host_dsa_key

i can log now with ssh the mac from my local network but not from outside. the nat doesn't work with it. but the nat fully works with another computer so i guess i have to allow access from internet machines and not only same network machines.

hope it will help you ..... to help me.

thanks .
haim



cavaughan - Aug 7, 2005 - 2:00 pm
image
image
Ok, as I understand you can now ssh into your Mac provided the computer is in your local network, but if you try to log in from outside your network, then there is apparently no connectivity.

My first inclination is to think that your NAT isn't set up right. See if there is some way to check that.

Also, I would like to know whether when trying to ssh into your Mac from the Internet (outside), do you get any message on the computer your sshing from?

I assume you have haven't messed with any ssh related config files under /etc. Specifically, the ssh_config file has a parameter:
Host *
But by default it is commented out. This is it has a # sign in front of it. You could try uncommenting it, but this shouldn't matter.

Give these idea a try.

--------
Curtis Vaughan
cavaughan@gmail.com
haimmamou - Aug 8, 2005 - 2:04 am
image
image
i'll try your last idea in minutes and tell you.

i am sure other computers connect the mac from the internet cause i get a connection closed message. anyway ididn't touch any config files.

maybe this last idea will save me.

thanks again

Haim
haimmamou - Aug 8, 2005 - 2:55 am
image
image
here is what i get when sshing the mac from my emac with the internet address of my router:

ssh: connect to host xxx.xxx.xxx.xxx port 22: Connection refused.

i confirm that from local network, everything is just fine and also that i don't have any line like "Host *" in sshd_config file.
haimmamou - Aug 8, 2005 - 3:02 am
image
image
sorry "Host *" was commented out in ssh_config. i removed the comment. still the same when sshing the mac from the mac with internet address. same thing from another client.

also in ssh when connecting from windows, the keyboard is a very strange mapping, near a querty one. thing is going more complicated i guess since i have a mac keyboard on windows but do you have something to have same keymaps in the host and client. problem mostly seen from vnc. mac has local osxvnc 1.5 running.
cavaughan - Aug 9, 2005 - 2:07 pm
image
image
Sorry, but I have a lot of work right now. I will get back to you hopefully later today or tomorrow.

--------
Curtis Vaughan
cavaughan@gmail.com
haimmamou - Aug 9, 2005 - 2:11 pm
image
image
no prob, thank you for your help. i keep looking for an answer and get some information on ssh so i am less idiot with you.

thanks a lot.

Haim
cavaughan - Aug 10, 2005 - 6:15 pm
image
image
Ok, let's take a step back!
Let's put the comment back prior to Host, first off. I looked at my machine and other linux machines and the problem is obviously not here.

Although I would like to make sure that you have NAT set up right, the fact that you are getting a Connection refused seems to point to something else.

Can you try again from outside your LAN, then look to /var/log/secure.log and /var/log/system.log for what's going on with sshd.

--------
Curtis Vaughan
cavaughan@gmail.com
haimmamou - Aug 11, 2005 - 2:13 pm
image
image
i am so confused. something i still can't understand.

i have 3 ip addresses for my macmini:
1, localhost
2, 192,168,xxx,xxx
and the wan ip from my router.

from my mac i can connect using 1 and 2 but not number 3.

what i tried is to ssh from my mac to another host and then in this ssh session, sshed back to my mac and it worked.

so everything is ok i guess i still really don't understand why i have those connection refused ?

any idea ?

anyway, i really thank you for your help, it was really great to work with you.

thanks again.

Haim
cavaughan - Aug 11, 2005 - 4:08 pm
image
image
I would like to suggest that we write off this forum and to our email addresses to better facilitate speed. But if you don't want to it's OK.

As I understand you MAC has 2 IP addresses.
Of course there is the localhost (lo0) or 127.0.0.1

Let's forget about it.

Then there is your network card:
en0: 192.168.x.x

Unless you have another network card or have aliased an additional address to en0, then you have no other IP addresses. Right?

The WAN address you refer to is your public address right? That is to say, your Internet address or external address to the world. And this address is NAT-ed through the router to your address.

For example, let's say your external address is that for www.msn.com. When I pinged that domain name, I get: 207.68.171.245

So let's say, 207.68.171.245 is the address your internet connection, your modem/router has. You can access your modem from anywhere in the world using that address. Are you with me?
And so in the router (which may not necessarily be the modem) you have a routing table that says any communication on port 22 that comes in on 207.68.171.245 shall be transferred/translated over to 192.168.x.x (your MAC). Is this right?

So, your computer really only has 2 addresses, right? And if just forget about the localhost address (which every computer has), your computer really, really has only 1 address.

--------
Curtis Vaughan
cavaughan@gmail.com

IF THIS IS YOUR QUESTION AND YOU WISH TO RESPOND, LOGIN HERE FIRST.


Search Engine Optimization by vBSEO 3.3.0 RC1