Solved

Linux: Remote reboot

Posted on 2010-08-12
3
481 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 500 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
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…

690 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