![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| retrieve file from windows server | damn_bkb | High Level Programming | 1 | 01-21-2008 11:21 AM |
| Linux Going Big Time and Prime Time Against Windows, UNIX (WSJ) (Addict 3D) | iBot | UNIX and Linux RSS News | 0 | 06-21-2007 04:10 PM |
| verify date and time on unix | pradeepmacha | Shell Programming and Scripting | 6 | 08-02-2005 05:28 AM |
| text boxes, radio buttons , check boxes in c++ on unix | devy8 | High Level Programming | 3 | 07-07-2001 05:58 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
To retrieve Date/Time from Windows by unix/linux boxes
Hi
I have a unix box and a linux box. I am writing a script that will get a date and time from a windows box which acts as a reference clock for the unix and linux boxes. I can only ssh to the windows XP box from the unix/linux boxes. This is my problem. So I have -bash-3.00# ssh x...@4.4.4.4 "cmd /c c:/\cygwin/\cygwin.bat date" x...@4.4.4.4's password: xyz@xyz_pc2 ~ But I'm not getting a response back with the date. But if I -bash-3.00# ssh x...@4.4.4.4 "cmd /c date /T " x...@4.4.4.4's password: Fri 02/08/2008 How can I retrieve the date and time from cygwin ? I need that to format the date and time which XP DOS doesn't allow me to. thanks Any help is appreciated Ideally, I'm looking to retrieve a format that's like YYYY/MM/DD HH:MM:SS format from Windows but its peculiarities is difficult for me to get it right. I can't format DOS to what I like to achieve. Any suggestion to this ? Any help is appreciated Thanks |
|
|||||
|
Just suggestion, wouldn't it be better to setup something like Tardis and broadcast NTP from windows? Or if they aren't on the same network ntpdate from *nix to Windows via SSH (port forward)?
Seems like any work with scripting will just plain loose any time resolution. Also you could have the *nix clients sync together as well as a pool. |
|
||||
|
I'm getting this now.
Do you know what parameters in sshd.config file those 2 permissions are denying me ? -bash-3.00# ssh xyz@4.4.4.4 "cmd /c date /T " Permission denied (publickey,keyboard-interactive). HV - I don't quite understand you meant in your reply. Thnaks |
|
||||
|
Perhaps you should try simply opening an (interactive) SSH session to that machine and back again.
That 'permission denied' error usually means one of the machines the SSH keys have not yet been exchanged both ways. (You get that error a lot if you combine SSH/scp with sudo for local write permissions) Also, you might need to change some permissions. SSH daemons tend to log the reason they deny permission in their syslog file. I know this file is called /var/log/secure in Linux, I have no idea what it is called in cygwin |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|