Troubleshooting WinRM for Hyper-V WorkGroup Config - hyper-v

I have Hyper-V Core deployed on 2019. I followed the instructions from a youtube video to enable management without a domain but for some reason it has recently stopped working with the error:
Those instructions from the youtube video can be summarized by
Set Network Category to private on Both Computers
Enable ICMP Ping to the Hyper V server
Enable Remote Management option on Hyper V
Enable WinRM with quickconfig
Add computers to Trusted Hosts
Save your credentials with CMDKey.
I have checked the trustedhosts on both the Server and my Computer and all seems good. Additionally I have verified I can ping both with both the Computer name and the IP successfully
HyperV Server (added both the computer name adn IP address in trying to troubleshoot)
get-item wsman:\localhost\client\trustedhosts
WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Client
Type Name SourceOfValue Value
---- ---- ------------- -----
System.String TrustedHosts 192.168.1.184,My-pc
My Computer
get-item wsman:\localhost\client\trustedhosts
WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Client
Type Name SourceOfValue Value
---- ---- ------------- -----
System.String TrustedHosts hyperv_01
Network Category is still set to Private as verified by "Get-netConnectionProfile" and authentication works as when I RDP to the HyperV Server it just connects without prompting for password. Additionally when I launch Server Manager on my computer to the Hyper V computer it all works just fine.
I am at a loss on how to troubleshoot this or get to the bottom of why I can not connect to hyperV Manger on my server, what further troubleshooting should I be looking at?

Compare patch level both on host and the client.

Related

Azure VM Disconnects after changing DNS

I have an public Azure VM instance running Windows 10 . I changed the DNS to Google DNS and I loose RDP connection. Why?
While changing the DNS servers, please follow below steps:
Changing the DNS servers to Google DNS servers can be done via Azure portal or PowerShell.
From Azure Portal, Navigate to your VNET, click on DNS servers and enter the DNS server IPs.
After doing changes to DNS, Virtual Machine need a reboot. Make sure to reboot the VM.
This change can be done on the NIC of Virtual Machine not on the OS level.
Resize the Virtual Machine, if reboot doesn't restore connectivity. This should return the RDP and the DNS entry you defined.
Try redeploying the Virtual machine.
Otherwise, Try resetting the Remote Desktop configuration.
Try Checking the Network Security Group rules.
Try Resetting the NIC for the VM.
To know more in detail, please refer below links:
Lost connectivity to Azure VM after changing DNS to automatically obtain DNS - Microsoft Q&A.
Cannot connect with RDP to a Windows VM in Azure - Virtual Machines | Microsoft Docs
VM getting disconnected after changing preferred DNS IP (microsoft.com).
Change VM DNS Servers - Microsoft Q&A.

Setting static IP address in Hana Express Edition

I have installed at work SAP Hana Express Edition 2.0 in my laptop. It runs on VMware/Suse. I also set up a static IP address so I don't have to change the client connections. This works fine when I'm at work.
I added the following to hosts file:
192.168.1.85 hxehost
Problem is that when I take my laptop somewhere else all my client connections time out. I checked the IP address in Suse and it's the one I assigned. How to fix this problem?
If I disconnect the laptop from the Internet, I get the following error:
JDBC: Cannot connect to jdbc:sap://192.168.1.85:39013/ [Cannot connect to
host 192.168.1.85:39013 [No route to host: connect],
This is my setup:
How you connect to the virtual machine's IP ports depends on the setup chosen for the VM networking.
The address 192.168.1.85 is part of the 192.168.1.x network, which is very popular for home-router setup and small LANs. It's very likely that your laptop is part of such a network, when not at work. So when you ping the address the laptop uses the network interface that is linked to this network (e.g. your wifi adapter) to look for the host with IP 192.168.1.85. Whoever host currently got the 85 in your network, it's likely not your virtual machine.
One easy way to avoid this is to setup the virtual machine with host-only network. For that you have to configure the network adapter in VMware (or whatever hypervisor you use) to use the host-only network and assign an IP address in a different subnet e.g. in 192.168.5.x. For the HANA client software on your computer, the address to use would, of course, be 192.168.5.85 but it would be stable across all networks your laptop may log into.

Amazon EC2 SSH server sent: ( publickey, gssapi-keyex,gssapi-with-mic)

I get this error message when trying to connect with ssh.
Disconnected: No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)
I create a instances(cent os), generated my webserver.pem, puttygen imported that and output a ppk
I have seen that it may be a permissions issue with the ~/.ssh on the server but how can i change the permissions on the server without ssh access to the server? Is there another way to connect that i am not aware of? I am quite new to the amazon ec2 stuff.
I am on a windows system right now using putty.
My security groups were incorrect. I remade the instance with the correct security groups
The below steps worked for me.
Edit sshd_config file sudo vi /etc/ssh/sshd_config.
Search for PasswordAuthentication
If it is no, change it to yes. For me it was commented. If so, uncomment it.
Restart sshd service sudo systemctl restart sshd.service
Done.
These are the basic steps generally when working with a public cloud, trying to create a Virtual Machine and connect to it.
Create a Virtual Cloud Network/ Virtual Private Cloud
Create an Internet Gateway and ensure the Route Table for the VCN has the entry to route internet bound traffic (destination 0.0.0.0/0) to the internet gateway
Create a Virtual Machine (Linux in this case), ensure it has a public IP ( VM be created in public subnet ), download the key pair (for example was in PEM format)
Create a Security Group and ensure ingress rule from source : 0.0.0.0/0, protocol: TCP, destination port: 22
Associate the VM with the Security Group at VNIC level at the time of creating the VM or post creation.
From Oracle Cloud documentation -
Just having an internet gateway alone does not expose the instances in
the VCN's subnets directly to the internet. The following requirements
must also be met:
The internet gateway must be enabled (by default, the internet gateway
is enabled upon creation). The subnet must be public. The subnet
must have a route rule that directs traffic to the internet gateway.
The subnet must have security list rules that allow the traffic (and
each instance's firewall must allow the traffic). The instance must >
have a public IP address.
Now connecting to VM using putty, basically you are doing a :
ssh user#ip_address —i private_key
a. Use puttygen and load the private PEM key that you downloaded. Once successfully imported, save the private key (optionally with a passphrase) as PPK in your local machine ( for example "your_pvt_key_name.ppk" )
b. Use putty to connect to the VM's public IP. Ensure in putty when connecting to the VM that private key is provided for authentication. In the section Connection->SSH->Auth, browse for the "your_pvt_key_name.ppk" and then go back to the Session and "Open" the VM. If the VM is on public subnet with correct route table entry, you should see the login screen. In case the VM is not available on internet, it wont connect !
c. Once you see the login screen most important and which is the probable cause of the above error, login with correct user name, such as "ec2-user" in AWS or "opc" in OCI. Using an incorrect user name results in this error.
No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)

Connect to remote Openbravo ERP Appliance

I have my Openbravo appliance running by VMWare workstation on top of Win7 which is in a LAN connected to internet by router.
When I start the appliance. I can access ERP web console by typing in the address it gave at the end of the process (for example, 192.168.1.107). All computer in the LAN can access this address as well which is fine for now.
However, in the future, I need to access this console from my home pc running Win7 (which is, of course, connected to the internet). How do i set this up?. I have try the method given in http://planet.openbravo.com/?p=8612 (see case 3 - Expose my local ERP into a remote network)
I tried (in Openbravo Appliance console running in VMWare)
ssh -R :9999:localhost:80 myhomepc#101.108.70.128
(where 101.108.70.128 is the ip of my home pc read from whatismyip.org)
but it give the following error:
ssh: connect to host 101.108.78.128 port 22: connection timed out
Do I missed any step required?
What should i do the successfully connect to my Openbravo instance?
Best is to ask those questions directly in the Openbravo ERP forums over there: http://forge.openbravo.com
The case 3 from the blog-post you are referring to makes 2 implicit assumptions.
a.) the remote computer runs an ssh-server
b.) This ssh-server can be connected to from the erp instance
One of the two assumptions seems to not hold in your case either your win7 box does not run an ssh server and/or the router of your home network does not forward port 22 from the outside to your win7 box.
Without further information i assume both items are not done.
Let me propose another solution instead. As you want to connct to the commandline of the erp appliance from home you could do the following:
Configure the router of the network with the erp appliance to connect some external port (i.e. 2222) to the ip of the appliance, destination port 22.
This will allow you to access it from the home network (or any other system from the internet knowing the ip/port).
Using an external port different from 22 some simple ssh brute-force passwords scans.
As the appliance by default does not allow login by password but only allows authentication by public-key this is secure to not allow unauthorized access to your system.
After this either use case 1 from the blog-post or an normal ssh tunnel like (ssh -p external-port user#externalipoferplan -L 9999:localhost:22' and then access the ERP via 'http://localhost' from your win7 box.
If that is too complicated and you want to just make the ERP webinterface available from the internet without having the extra ssh security in the middle then you can just configure the router of the erp lan instead to forward port 80 or 443 (http or https) to the erp-instance and access the system directly from anymore as if it would be on some public server in the internet.

Debug Windows Phone 7 application that contacts locally hosted WCF server

I've built a WP7 application and a locally hosted (on my machine) WCF server in my solution. I have debugged it using the emulator and it works fine, however, when I debug via device and try to connect to the server I get an exception stating that the EndPointNotFound (I'm aware I haven't set up anything to catch this exception!). Is there anyway to connect to a localhost server via the device?
Many thanks
Jonno
If you are trying to connect to your local machine from an actual device and it si not tethered, make sure that you are connected to the same local network.
What is the host name you are using to try and connect to the host machine? The emualtor will be able to resolve "localhost" to the host mahcien but your phone won't. You'll need to use the appropriate host name or IP address.
Download and install the Visual Studio SP1 tooling and host your WCF services using IIS Express. This webserver accepts incoming connections from other computers on your local network as long as there's a firewall exception to allow the connection.
You'll have to connect to the machine hosting the service through it's external IP. That cannot be localhost or 127.0.0.1 (it has to be something belonging to the same subnet).
Scott Hanselman had a presentation about the "MS Web Stack of Love" where he demos how to set all this up (using HTTPS even) and it goes into depth about how to configure the firewall and all that jazz. I recommend watching it, as he is also, a funny guy.
You can use a Wifi connection on WP7 and the local ip of your server in the config file to reference your WCF server ?