Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a windows box setup with cygwin and an ssh server that has been working fine, however today I came across a command I am trying to use that returns different results based on whether it is used locally or over ssh.

First we have the results of running it over ssh...

ssh -i /tmp/tmpyEW3f0 Administrator@10.13.7.210 'tasklist /FI "username eq Administrator"'
INFO: No tasks running with the specified criteria.

Now we run the same command locally on 10.13.7.210 and recieve this result...

C:\Documents and Settings\Administrator>tasklist /FI "username eq Administrator"
Image Name                   PID Session Name     Session#    Mem Usage
========================= ====== ================ ======== ============
explorer.exe                 536 RDP-Tcp#14              0     24,400 K
jusched.exe                  776 RDP-Tcp#14              0      9,228 K
ctfmon.exe                   780 RDP-Tcp#14              0      3,456 K
ApacheMonitor.exe            796 RDP-Tcp#14              0      2,520 K
rdpclip.exe                  444 RDP-Tcp#14              0      4,344 K
jucheck.exe                 1160 RDP-Tcp#14              0      8,708 K
cmd.exe                      876 RDP-Tcp#14              0      2,852 K
tasklist.exe                3008 RDP-Tcp#14              0      4,292 K

Any idea why these are producing different results?

share|improve this question
    
Almost certainly yes, but just to make sure, are you running the command as the same user in the local session? –  Costa May 16 '13 at 15:19
    
Yes, it is running as the same user in both situations. –  EEP May 21 '13 at 18:04
    
try with 'CMD /C' before your tasklist command, also run 'whoami' instead of tasklist and see what it says –  golimar May 23 '13 at 10:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.