I'm trying to connect to a remote Windows 7 box that needs a setup change or two. I've got access to an Administrator account via Cygwin's SSH server, but Cygwin won't let me run Administrator-privilege utilities ("The requested operation requires elevation (Run as administrator.)")

The standard solution for this is, to the best of my knowledge, RunAs.exe, but trying to run it via SSH results in it quitting instantly with no diagnostic (even when run as "runas /?"). Starting "cmd" from ssh gives me a standard DOS prompt, but from the DOS prompt, "runas" just echoes the commandline back at me no matter what I do, again, even when run as "runas /?".

Cygwin won't let me connect as Administrator@computername.

Any suggestions?

link|improve this question
bump I'd like to know the answer to this too. – user73139 Mar 23 '11 at 22:37
feedback

2 Answers

If you log in to sshd with password authentication, then you authenticate simultaneously to Windows and should be granted your account's administrative rights. If you log in with public key authentication, then sshd makes an end run around Windows authentication, and you'll only ever have standard user rights.

For more information, see Corinna's answer to this question from 2004. See also the recent thread on the Cygwin mailing list about admin rights over ssh.

link|improve this answer
feedback

Have you tried to do runas against cmd.exe?

Logically that would open cmd.exe with an elevated permissions set allowing you to do whatever you like as the administrator. I'm not a Windows user so I can't really test it.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.