Operating System - HP-UX
1827806 Members
2294 Online
109969 Solutions
New Discussion

Re: How can I run a UNIX command in Windows2000?

 
SOLVED
Go to solution
Fragon
Trusted Contributor

How can I run a UNIX command in Windows2000?

Not using telnet,just like rexec in UNIX/linux.
Thanks.
18 REPLIES 18
Massimo Bianchi
Honored Contributor
Solution

Re: How can I run a UNIX command in Windows2000?

Hi,
with the resource kit come some tools like rsh, that is the equivalent of remsh in hpux.


There are also lot of tools that can help you, even aunix emulator that integrates in win.

it is free.

http://www.cygwin.com


You can have the power on unix on window servers, or just simply what you may need, say awk, vi, grep, remsh....



Ollie R
Respected Contributor

Re: How can I run a UNIX command in Windows2000?

Hi HPUX (made up name I think!),

One word springs to mind - SSH.

Try following this link for details:

http://forums.itrc.hp.com/cm/QuestionAnswer/0,,0x65c868da2286d711abdc0090277a778c,00.html

Ollie.
To err is human but to not award points is unforgivable
Fragon
Trusted Contributor

Re: How can I run a UNIX command in Windows2000?

OK, I use rsh in Windows2000 to make a test :
c:\>rsh 192.168.100.1 -l root echo "DOS" >dos.txt
But I got an error like this:
192.168.100.1: remshd: Login incorrect.
rsh: can't establish connection

So, I wonder if I must setup some entries in .rhosts in HP-UX? Or are there any other solutions? I won't use any 3rd tools at all.

Thanks in advances.
Donny Jekels
Respected Contributor

Re: How can I run a UNIX command in Windows2000?


Have a look at the latest SFU 3.0 it comes with over 1900 ported unix tools.

It even teaches windows to be case sensitive.

so yes you can have 2 files with the same name in one directory.

/dev/fs/C/myfile & /dev/fs/C/Myfile


http://www.microsoft.com.sfu

peace
Donny
"Vision, is the art of seeing the invisible"
Denver Osborn
Honored Contributor

Re: How can I run a UNIX command in Windows2000?

If you setup your ~/.rhosts file for that user, then it should work using rsh. Without having to setup the .rhosts file, try rexec instead. You should be prompted for the user's password if you use rexec.

c:\rexec 192.168.100.1 -l root -n ls ~/

Hope this helps,
-denver
Fragon
Trusted Contributor

Re: How can I run a UNIX command in Windows2000?

Thank Denver very much!
I use rexec instead, it work ok with the user's password,but still fail using rsh!
I setup ~/.rhosts like this:
192.168.100.13 root

In 192.168.100.13(windows) I do:
C:\>rsh 192.168.100.1 -l root -n ls
192.168.100.1: remshd: Login incorrect.
rsh:can't establish connection

How could I ...

Thank everybody gave useful advice!
Fragon
Trusted Contributor

Re: How can I run a UNIX command in Windows2000?

Thank Denver very much!
I use rexec instead, it work ok with the user's password,but still fail using rsh!
I setup ~/.rhosts like this:
192.168.100.13 root

In 192.168.100.13(windows) I do:
C:\>rsh 192.168.100.1 -l root -n ls
192.168.100.1: remshd: Login incorrect.
rsh:can't establish connection

How could I ...

Thank everybody gave useful advice!
Vitaly Karasik_1
Honored Contributor

Re: How can I run a UNIX command in Windows2000?

and you can buy MKS tools (http://www.mks.com/) , you you like to pay money for software...

Regards,
Vitaly
yogesh_4
Regular Advisor

Re: How can I run a UNIX command in Windows2000?

there is one more tool Avilable with Micosoft "Services for unix" . If you local that , it will solve your problem. Some sites are providing free download for this.
Zeev Schultz
Honored Contributor

Re: How can I run a UNIX command in Windows2000?

MS SFU are not free of charge but has evaluational period.See here:http://www.pcmag.com/article2/0,4149,54081,00.asp
I though would go for Gygwin as it's free and
includes everythin (even like Apache or ssh running under it).R-commands are sysadmin best
friend and of most problematic.hp-ux Rexec for example doesn't care of console (/etc/securetty) settings and so on.
I'm using cygwin for a ^3 years,same time the Microsoft added unix api support to nt I guess,and was very pleased.However if you go for LDAP-Active Directory integration kinda things (with hp-ux) you'd need MS SFU.
Last one ( :) ) I once saw Brocade's remshd binary for pulling firmware to their switches and played with it a bit.Serves the purpose.
Also tried some commands from WinNT resource kit,gnu-like grep,remsh etc.
And really neat one is from AT&T labs:
http://www.research.att.com/sw/tools/uwin/

So computers don't think yet. At least not chess computers. - Seymour Cray
Caesar_3
Esteemed Contributor

Re: How can I run a UNIX command in Windows2000?

Hello!

Add to your ~/.rhosts +
then try to made rsh,
what you added is ip and user root
but on the windows you not using root user
so add + and check it.

Caesar
Fragon
Trusted Contributor

Re: How can I run a UNIX command in Windows2000?

Hi Caesar,
You should get 20 points!
Once success, I can make a further test for certain user!!!

-ux
Massimo Bianchi
Honored Contributor

Re: How can I run a UNIX command in Windows2000?

Hi,
since this question is coming back, i will add a little note to Caesar hint.


Adding a + in the .rhosts is a big secutiry risk, because any user can login from that host.

After addig the plus,
check with

"who -HRT" or in the syslog, to see how the user presents.

and finally remove the plus !

Massimo
Fragon
Trusted Contributor

Re: How can I run a UNIX command in Windows2000?

Hi Massimo and other guys,thank you very much again!
I make a test for certain users now!
I change the .rhosts in HP-UX side (hostux) like this:
hostwin +
From hostwin(Windows2000 OS), I type:
c:\> rsh hostux -l root sleep 10
It runs OK!
But when I type:
c:\>rsh hostux -l zhou sleep 10
I get the error:
remshd: login incorrect.

I have the account root & zhou in both UNIX & Windows2000 side and keep their passwords same!

What's the reason?

-ux
Caesar_3
Esteemed Contributor

Re: How can I run a UNIX command in Windows2000?

Hello!

Create in the home dir of user zhou .rhosts like in the home dir of root you made.
That should help because you didn't allow to
user zhou access without password.

Caesar
Fragon
Trusted Contributor

Re: How can I run a UNIX command in Windows2000?

Hi there, thanks!
I did in /home/zhou/.rhosts!!!

Between HP-UX & HP-UX, all work fine; but between HP-UX&Windows, only "+" ok!

Amazing...

-ux
Steven E. Protter
Exalted Contributor

Re: How can I run a UNIX command in Windows2000?

I know this is late but there are a few packages that give UNIX commands in Windows.

http://download.com.com/3000-2094-6601917.html?tag=lst-0-1

We just used a windows version of sed to change the configuration of our end user telnet clients to connect to our new production server which goes into production on August 4.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Miles Roper
New Member

Re: How can I run a UNIX command in Windows2000?

Hi,

I'm actually getting exactly the same problem. Unless I use in hosts.equiv

donald +

I can't do a

remsh mickey -l me ls

from a hpux 11.0 box, or a win2k box, or a linux box.

Cheers

Miles