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

purduematt

macrumors newbie
Original poster
Jul 17, 2002
29
0
i just built myself a server to play around with, and loaded ret hat linux on it. i had a few questions that i though you guys might be able to help with.

when i connect via ssh is there a way to restart the server via ssh?

how can i copy a file from my computer to the server with ssh (what would the command look like)?

has anybody attempted to use a server running red hat to act as a print server? i would like to do this so i don't have to plug my printer into my powerbook every time i set it up at home.

i believe i read somewhere that you can use programs that have a graphical user interface with the apple's X11 package. could anybody provide me with a quick tutorial for a beginner on how to do this.

thank you,

matt
 
Re: linux

when i connect via ssh is there a way to restart the server via ssh?


'shutdown -r now' make sure you have the privileges or just 'sudo' it as well
how can i copy a file from my computer to the server with ssh (what would the command look like)?


'scp' does this. the command goes like so 'scp user@host1:/path/to/file user@host2:/path/to/file'


as far as the other stuff...its a little more complicated, so it would be best to do a google search including the word 'howto'
 
Redhat (along with most other Linux distros) normally have reboot defined as shutdown -r now as a shortcut. You do normally need to be root to do this. Look into CUPS for your printer sharing (it's what Mac OSX uses too).

For X you need to start X11 on Mac OSX. You then need to ensure that the correct ports are open in your firewall (if appropriate) and that the other machine is allowed to connect (xhost <server ip>).

Now ssh into the server and set the display variable (export DISPLAY=<powerbook ip>:0.0). Now try starting an X program (xeyes say). It should appear on your powerbook screen.
 
X11 ssh tunnel

You can also use sftp, it's part of ssh as well (I think). It works with my RedHat server.
Code:
 sftp user@host

An easy way to run XWindows programs on your Mac is to load Apple's X11 server or XDarwin. After you have it loaded and running open an xterm (Apple opens on by default) and type this:
Code:
 ssh -l user -X ipaddress

After you type your password and log on any program you run will be displayed on your Mac.

You may want to check out http://www.samba.org/ and learn howto setup Samba, I think it's the easiest way to share files. Then check out my article on macoshints to share music http://www.macosxhints.com/article.php?story=20030711140157143
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.