LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Other *NIX (https://www.linuxquestions.org/questions/other-%2Anix-55/)
-   -   Creating OS X ssh server (https://www.linuxquestions.org/questions/other-%2Anix-55/creating-os-x-ssh-server-4175544220/)

wagscat123 06-01-2015 09:15 PM

Creating OS X ssh server
 
Hi all,

I'm having trouble setting up my iMac to be accessed by Linux machines at home and on vacation to be able to be remotely accessed and managed via ssh.

I followed these directions:

http://osxdaily.com/2011/09/30/remot...rver-mac-os-x/

And when I set it up, OS X told me to log in by typing "ssh username@ip.address", except with the actual login values. When I tried this from my home machines, I got:

Code:

ssh_exchange_identification: read: Connection timed out
Any idea on what gives? I suspect it may be that OS X's preferences gave me the internal IP address, not the external.

Thanks!

ferrari 06-01-2015 10:34 PM

Well, can you ssh from another machine within the LAN? If you're trying to reach it from the internet, you will need to configure your firewall/router first.

I would also expect to see the port status at the router....
Code:

nmap <router-public-IP-address

wagscat123 06-02-2015 10:08 AM

I can check the port status until later, but if it adds anything I'm connecting through a campus network that has thongs like a log in when you first connect a new device and allocates bandwidth to individual users.

wagscat123 06-02-2015 12:23 PM

I ran nmap on the host with the IP address, and got
Code:

lynnes-iMac:stereo-pair CSSTinterns$ nmap ipaddress

Starting Nmap 6.47 ( http://nmap.org ) at 2015-06-02 13:15 EDT
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 3.13 seconds
lynnes-iMac:stereo-pair CSSTinterns$ nmap -Pn ipaddress

Starting Nmap 6.47 ( http://nmap.org ) at 2015-06-02 13:17 EDT
Nmap scan report for ipaddress
Host is up.
All 1000 scanned ports on ipaddress are filtered

Nmap done: 1 IP address (1 host up) scanned in 201.42 seconds
lynnes-iMac:stereo-pair CSSTinterns$

For privacy reasons I replaced any mentioning of my IP address with "ipaddress"

I also tried sshing in the same university wireless network (and presumable the same LAN), and had the same results. One of my co-workers uses vpm before he sshs into a faculty member's computer. Do you think I want to do something like that?

ferrari 06-02-2015 04:23 PM

If you're trying to connect into a network that you don't administrate, you'll need to get their advice about accessing servers. If your colleague connects via VPN (as I also do in when working remote from my workplace), then you'll probably find that you need to do the same. You should then be able to ping the machine via it's LAN IP address, and check with nmap (or telnet) that is is listening on the configured port (22 by default).

wagscat123 06-02-2015 05:27 PM

I can switch it to a public Wi-fi yet and the same issue arises. Should there theoretically be no issue then and I can simple go with setting up ssh in OS X's preferences? I'll still try that anyways though.

wagscat123 06-03-2015 08:18 AM

nmap still failed with the same output, telnet failed, and when I ran ping, it gave me no output until I Ctrc+C'ed it. Here was its output from when I pinged from another computer:

Code:

-bash-4.1$ ping ip.address
PING 130.85.254.99 (130.85.254.99) 56(84) bytes of data.
^C
--- ip.address ping statistics ---
499 packets transmitted, 0 received, 100 packet loss, time 498154ms

-bash-4.1$

The Mac could ping itself at least.

Could port forwarding be part of the solution?

ferrari 06-03-2015 04:52 PM

Ask your network administrators for help. They should be able to help you access the server remotely.

wagscat123 06-04-2015 11:42 AM

I guess I'll do that. Thanks!


All times are GMT -5. The time now is 04:05 PM.