I have used WinRM on some occasions to expose metrics - without using VPNs and such. But there are some security considerations:
- Try running
winrm get winrm/config
to see how things are
configured currently.
- Make sure WinRM uses has a certificate installed for HTTPS purposes. This has to go into the
Personal
store on the Local Computer
(yes - odd nomenclature)
- Enable HTTPS by doing
winrm quickconfig -transport:https
Once the transport is secured, you need to enable client certificate authentication and disable everything else:
- Disabling stuff is done like this
winrm set
winrm/config/client/auth @{Digest="false"}
.
- Disable Kerberos, Digest and whatever else is around.
- Enable certificate authentication by doing
winrm set winrm/config/client/auth @{Certificate="true"}
- I can't quite remember if you need
winrm set winrm/config/client/auth '@{CredSSP="true"}
for things to work - it may be needed for credentials delegation.
This works well and if you trust the Windows HTTP transport, the Windows PKI infrastructure and you have a firewall in place that lets you filter out obvious nasties, it is an option that works out fine. It is quite nice if you need to collect things programatically.
Now, the other thing is: will you be able to get all the info you want via WinRM? This is not as easy to answer. I find that a number of things are harder to get at than you might think. I want status on RAID controllers and such, but this is difficult at best. Using RDP over SSH (just to be sure) is still my favored way of doing this because of the added versatility you get.
In conclusion, yes - you can use WinRM without VPNs and such, but you should consider if it gets you what you want in the end.
EDIT: Comparing the use of WinRM with SSH is perhaps not entirely useful - at least from a feature package perspective. Using SSH, you can get anything if you are prepared to write something that collects the information you want. WinRM is less versatile in that sense. Securitywise, however, both are fine IMHO if you lock things down properly which is entirely possible.