Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Cave Man

macrumors 604
Original poster
I'm having trouble getting an xterm window open from my Mac Mini to my Mac Pro. Both machines are running XQuartz and from an xterm on the Mini I type:

rsh -l myloginname xterm -display xxx.xxx.xxx.xxx:0.0 &

The error message generated is:

rcmd: getaddrinfo: nodename nor servname not provided, or unknown

Clearly, I am invoking it incorrectly. My address is correct because it's the same that I use for Screen Sharing and it works just fine. Any tips?
 
For what you are trying to do, i would use SSH.

Edit /private/etc/sshd_config on the Pro
Change : #X11Forwarding no
To: X11Forwarding yes
And start the SSH server in system preferences (sharing->remote login).

On the Mini, execute the command:
ssh -X yourloginname@xxx.xxx.xxx.xxx xterm

Of course, starting xterm is really unnecessary. Better off just ssh'ing unless you are doing something specific with X
 
Last edited:
I want to remotely log onto my Mac Pro from another computer using xterm.



To run command line software on the Mac Pro.

XQuartz is completely unnecessary for this. You'd only need this to login to your Mac Pro and run GUI software which requires X (such as those you've compiled with Macports).

To do what you need:

On the Mac Pro

1. System Preferences > Sharing > Enable Remote Login. This will start the SSHD service
2. Then set which users you want to login (if you have issues logging in set this to "All users" whilst diagnosing the problem).

On the Mac Mini

1. Applications > Utilities > Terminal
2. SSH to the Mac Pro by the command:
ssh username@ipaddressofmacpro (on my machine this would be "ssh sickboy@192.168.1.25"
then type that users password and press enter.
3. You will then be logged into the Mac Pro - run your terminal commands as required.

If you have issues:

1. Try using a non-root username when SSHing to the Mac Pro
2. Temporarily disable any firewalls on the Mac Pro
3. Temporarily allow access to "All users" when configuring the Mac Pro

----------

For what you are trying to do, i would use SSH.

Edit /private/etc/sshd_config on the Pro
Change : #X11Forwarding no
To: X11Forwarding yes
And start the SSH server in system preferences (sharing->remote login).

On the Mini, execute the command:
ssh -X yourloginname@xxx.xxx.xxx.xxx xterm

Of course, starting xterm is really unnecessary. Better off just ssh'ing unless you are doing something specific with X

Turns out the OP is trying to run command line software - changing the configuration of SSHD or even using XQuartz at all is completely unnecessary!
 
XQuartz is completely unnecessary for this. You'd only need this to login to your Mac Pro and run GUI software which requires X (such as those you've compiled with Macports).

To do what you need:

On the Mac Pro

1. System Preferences > Sharing > Enable Remote Login. This will start the SSHD service
2. Then set which users you want to login (if you have issues logging in set this to "All users" whilst diagnosing the problem).

On the Mac Mini

1. Applications > Utilities > Terminal
2. SSH to the Mac Pro by the command:
ssh username@ipaddressofmacpro (on my machine this would be "ssh sickboy@192.168.1.25"
then type that users password and press enter.
3. You will then be logged into the Mac Pro - run your terminal commands as required.

If you have issues:

1. Try using a non-root username when SSHing to the Mac Pro
2. Temporarily disable any firewalls on the Mac Pro
3. Temporarily allow access to "All users" when configuring the Mac Pro


Thanks very much. Still having troubles. When I type "ssh name@xxx.xxx.xxx.xxx" there is about a 15 second delay then I'm presented with the message:

ssh: Could not resolve hostname xxx.xxx.xxx.xxx: nodename nor servname not provided, or unknown

I am now connected to my Mac Pro from my MacBook Air by wifi. My Mac Pro is connected to the network by ethernet and I am sharing that ethernet connection over the Mac Pro's wifi (called "office") and my MacBook Air is connected to "office". The computers are only about a meter apart.
 
Last edited:
I am now connected to my Mac Pro from my MacBook Air by wifi. My Mac Pro is connected to the network by ethernet and I am sharing that ethernet connection over the Mac Pro's wifi (called "office") and my MacBook Air is connected to "office". The computers are only about a meter apart.


If you are using connection sharing on the Mac Pro in order for the Mac Mini to access the network (and that is it's only connection), it is probably on a different subnet.

On the Mac Pro, do the following:
1. Turn off Internet Connection Sharing
2. Open a terminal and run the following:
ifconfig
3. Keep a note of the entire output of this command (maybe copy and paste it into TextEdit
4. Turn on Internet Connection Sharing and then run ifconfig again. Compare this output to the previous output and you should notice that a new network "bridge" device has been created. On mine it looks like the following:
Code:
bridge100: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	options=3<RXCSUM,TXCSUM>
	ether 42:6c:8f:32:b1:64 
	inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
	Configuration:
		id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
		maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
		root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
		ipfilter disabled flags 0x2
	member: en1 flags=3<LEARNING,DISCOVER>
	        ifmaxaddr 0 port 5 priority 0 path cost 0
	media: autoselect
	status: active

5. Take a note of the "inet" field - that is the IP you would need to SSH to from the Mac Mini. In my example I would be doing the following from the Mac Mini terminal:
ssh sickboy@192.168.2.1
 
Sorry for the delay in replying - got distracted with other things at work.

The above works perfectly; however, how can I use this if I have to log on from my Mini at home? I first establish a VPN connection to the university, then I can do Screen Sharing. I also need to do a terminal.

Thanks!
 
how can I use this if I have to log on from my Mini at home? I first establish a VPN connection to the university, then I can do Screen Sharing. I also need to do a terminal.

It should be possible but will completely depend on the setup you have at home and also the VPN configuration your University uses.

The first thing I would try is connecting via VPN and then just attempt to SSH to the main IP of the Mac Pro (not the connection sharing IP in the last example). If you can't can you ping it's IP address?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.