Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a linux system (Suse 9.3) and a Windows 2003 server.
Is it possible to remotely shutdown the linux via the 2003 server ?
The reason why I'm asking this is that the 2003 server has UPS management software installed on it. And at power failure it automaticly shuts down the server. But I also need to shutdown the linux box.
Any solutions ?
Try webmin - you install it on the GNU/Linux box then access it via the browser on the winblows box. It allows remote system administration, shutdown, etc.
Install ssh in your linux box and setup sshd allowing root to connect without using a password (i.e. using keys). Then install putty in Windows and when you want to shutdown Linux you can use plink (putty command line):
You can create a linux user remshutdown. Change its default shell to shutdownscript.
In this script put
Code:
sudo /sbin/halt ; sleep 3; exit
You have to configure sudo so that remshutdown is alowed to launch /sbin/halt.
Install ssh on the linux box.
On the windows machine, use putty to ssh-login to the linux box as remshutdown. Putty has to be called when UPS goes down.
Install ssh in your linux box and setup sshd allowing root to connect without using a password (i.e. using keys)....
To expand on nx5000's message, do NOT set up root ssh access, with or without keys or strong passwords, on your linux box.
It is quite easy to make a new user (name it remshutdown like he suggested, or name it whatever you want) with a strong password or key who ONLY has sudo access to shutdown the system. It's also not too hard to get an ssh client to run a pre-configured script, which I assume you want to do since the shutdown will probably need to be a non-interactive command run by the UPS software on the 2K3 box. From there it's just a matter of making sure the ssh server is [installed and] running and picking which ssh client for Windows you want to use.
Both nx5000 and Darin are right about security
You can use your normal user account to halt/poweroff the linux box channging the setuid bit of halt if you don't want to mess with sudo. Just:
I like all these strategies, but I simply have to ask the question: Where is the big security faux-paus in ssh as root to a machine? I'm not trying to be antagonistic, I really want to understand this. Let me setup the situation in a little more detail.
1) Do not use keys for authorization. I still use a password authentication for ssh. I'm just using ssh for an encrypted connection (no keystroke monitoring and such).
2) Have a good host.allow and host.deny setup regardless.
3) All activitiy is happening behind a pretty good firewall.
Are you simply saying that you should never have the ability to login as root on any machine? I don't see the difference between a hacker accessing one of your machines because a user has poor password techniques and then getting lucky and figuring out roots amazing password and switching to root. He can also ssh to another machine that may have the same bad user, logging in as that user and hope that root set his password the same (which this root doesn't). Again, I'm not being antagonistic, I just want to know the issue here. Thanks a bunch. All the best....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.