?
Solved

Linux: Remote reboot

Posted on 2010-08-12
3
Medium Priority
?
486 Views
Last Modified: 2013-11-15
Hi there,

I need to make a Windows Batch File that will reboot a linux machine running Ubuntu 10.04 LTS

admin username=whatever
password=everwhat
ip=192.168.1.5

Could you please provide me with the required command line?

Cheers,
Rene
0
Comment
Question by:ReneGe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 23

Expert Comment

by:savone
ID: 33424439
This is not going to be all that easy.  If your using ssh you have two options that I know of.


1) Set key authentication so you do not get prompt for a password

2) Use an expect script to pass the password.

0
 
LVL 5

Accepted Solution

by:
group0 earned 2000 total points
ID: 33425813
Get plink (PuTTY link) - http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Put this in your batch file:
plink whatever@192.168.1.5 -pw everwhat < cmds.txt

cmds.txt:
/sbin/shutdown -r now

Link to the documentation - http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter7.html#plink
0
 
LVL 10

Author Comment

by:ReneGe
ID: 33429516
Thanks group0

Cheers,
Rene
0

Featured Post

Supports up to 4K resolution!

The VS192 2-Port 4K DisplayPort Splitter is perfect for anyone who needs to send one source of DisplayPort high definition video to two or four DisplayPort displays. The VS192 can split and also expand DisplayPort audio/video signal on two or four DisplayPort monitors.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question