- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Batch SSH from linux to Windows
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2006 10:39 AM
04-21-2006 10:39 AM
Batch SSH from linux to Windows
We have few Apache web-servers running on 3-4 Windows machines. We are planning to monitor those machines from a linux box. We check whether the web-site is up/down by using "wget" and then if the site is down, send mail alerts.
In addition to sending alerts, we would like to restart the web server if the site is down. We thought, the best way would be to set up freeSSHd server on Windows box and connect to windows from Linux using public-private keys and then execute some batch script located on Windows.
We have successfully set up the keys, so that we can connect to windows without specifying the password. But when I try to execute following command for testing -
ssh
EOF
its giving error -
"Pseudo-terminal will not be allocated because stdin is not a terminal."
I tried changing 'command line shell' in freeSSHd to cygwin.bat. But the problem still exists.
I tried to search on net, but did not find any post related to this.
Is this possible? Or we are trying to achieve something impossible?
Thanks for the help.
Regards,
Shailesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2006 12:00 PM
04-21-2006 12:00 PM
Re: Batch SSH from linux to Windows
ssh
EOF
Verify if the ls.log file is executed. Now, if you are success, how do you plan to stop the service? The net stop command won't be in cygwin I think. Windows 2003 have service recovery configuration.
Maybe, you can also enable telnet services on windows and use expect scripts to logon to the server and restart the service.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2006 12:07 PM
04-21-2006 12:07 PM
Re: Batch SSH from linux to Windows
As for the other, why don't you use the form:
ssh
You can stack the commands as well:
ssh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2006 02:03 AM
04-24-2006 02:03 AM
Re: Batch SSH from linux to Windows
This will disable pseudo-terminal allocation
which you shouldn't need for your script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2006 02:55 AM
04-24-2006 02:55 AM
Re: Batch SSH from linux to Windows
# ssh
This should fork ssh into background and force pseudo-tty allocation just before command execution.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2006 02:57 AM
04-24-2006 02:57 AM
Re: Batch SSH from linux to Windows
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2006 07:04 PM
04-26-2006 07:04 PM