I am trying to connect to a remote ssh server using the SshNet package.
My code looks like this:
List<AuthenticationMethod> authenticationMethods = new List<AuthenticationMethod>();
authenticationMethods.Add(new PasswordAuthenticationMethod(SSHusername, SSHpassword));
SSHConnection = new SshClient(new ConnectionInfo(ip, Int32.Parse(SSHport), SSHusername, authenticationMethods.ToArray()));
SSHConnection.Connect();
When the program tries to make the connection, I get the following exception:
Exception thrown: 'Renci.SshNet.Common.SshConnectionException' in Renci.SshNet.dll
An exception of type 'Renci.SshNet.Common.SshConnectionException' occurred in Renci.SshNet.dll but
was not handled in user code
Server response does not contain SSH protocol identification.
I have been searching for a solution for 2 hours now, but haven't been able to fix it.
Looking through the source code of SshNet if found this error is thrown when the client doesn't get an ssh version from the server. I'm not an expert in this field, but looking at wireshark the server sends a packet with this info:
SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.1
I'm pretty sure this is the ssh version it's looking for. So I hope one of you guys can tell me what else I can try to fix this.
My Core project has target framework .NET standard 2.0, the UWP project's min version is Windows 10 1903. The SshNet package is on version 2016.1.0
Related
Trying to use the Mountebank .Net Client for the test project
_mbClient = new MountebankClient();
_mbClient.DeleteAllImposters();
HttpRequestException: No connection could be made because the target
machine actively refused it
It turns out that the MbDotNet doesn't have Mountebank integrated which makes sense.
I thought that I only need to install this Nuget package and it includes everything.
So the answer is: I need to go to the Mountbank website and install it, after that run
mb
to start the server, then run my Xunit .Net Core code, then the magic will happen.
If you would like a different url to host the MB server, then use its command line command to run it against different port and remember to pass in the new port number into your
MountebankClient constructor.
That's it :)
I am receiving the following error from ADOMD while trying to connect to my SSAS Server.
An unhandled exception of type 'System.Xml.XmlException' occurred in
Microsoft.AnalysisServices.AdomdClient.dll
Additional information: Element 'return' was not found. Line 5,
position 2.
I can confirm the following:
My Connection String Is:
Data Source=<MyServer>;Catalog=<My SSAS DB>; UID=<MyDomain>\<MyDomainUser>;PWD=<MyPassword>;
I can confirm that my connection string is correct ( or at least the data I am using in the connection string above is correct). If I change any part of the connection string to an incorrect value the ADOMDConnection will return "Cannot connect to server". I have also looked at the audit logs on the server itself and confirm that I am successfully logging onto the server. And the contrary, with incorrect credentials the server logs confirm a failed login.
I am trying to connect to SSAS 2014 Enterprise
The failed connection returns within a few seconds. A few posts out on the internet suggest increasing the Connection Timeout property. This does not seem to be my issue as I have increased it to 120 and its failing within 5.
I am using ADOMD 12.0 Runtime 2.0.50727
My domain user is a domain admin and has been added to an admin role in the SSAS.
Im not sure what else could be wrong or how to debug this or is this a known bug in ADOMD?
Any advice would greatly appreciated.
thanks!
Jason
This happens routinely when the version of the ADOMD client DLL is not a version that matches the target version of the server instance. For example, Azure Analysis Services as of 09/13/2017 does not work with Microsoft.AnalysisServices.AdomdClient.dll version 13. Only version 14 and above.
For reference, the ADOMD DLL for Azure Analysis Service is available in the link below:
https://learn.microsoft.com/en-us/azure/analysis-services/analysis-services-data-providers
Double check to make sure the client DLL is the exact version needed for the target server instance. That solved this exact issue in my case.
I have been trying to connect to the Windows Service created in this tutorial:
http://www.asp.net/signalr/overview/deployment/tutorial-signalr-self-host
The thing is that I do can connect to it using its own client. However, I've tried to connect to it from a console application and haven't had success. Moreover, if I host the SignalR Hub in a console application I can connect to it successfully.
The errors that I got say that my client version isn't compatible with the server and that the connection was refused.
This is how my attempt to connect looks like:
IHubProxy _hub;
string url = #"http://localhost:8080/";
var connection = new HubConnection(url);
_hub = connection.CreateHubProxy("MyHub");
_hub.On("addMessage", x => ShowMessage(x));
connection.Start().Wait();
UPDATE:
-Errors Messages:
1.
Exception:Caught: "You are using a version of the client that isn't compatible with the server. Client version 1.4, server version 1.3." (System.InvalidOperationException)
A System.InvalidOperationException was caught: "You are using a version of the client that isn't compatible with the server. Client version 1.4, server version 1.3."
Time: 2/20/2015 12:03:36 PM
Thread:Worker Thread[5924]
2.
Exception:Thrown: "No connection could be made because the target machine actively refused it" (System.Net.Sockets.SocketException)
A System.Net.Sockets.SocketException was thrown: "No connection could be made because the target machine actively refused it"
Time: 2/20/2015 12:03:36 PM
Thread:Worker Thread[3320]
As pointed by Christophe, this question is a duplicate of SignalR Java client only supports exactly 1.3 and, in my case, was solved by uninstalling and re-installing all the SignalR/Owin packages.
I installed kafka_2.10-0.8.1.1 on a Ubuntu 12.04 (Linux ubuntu 3.8.0-44-generic) hosted by vmware player 6.0.3 build-1895310. On the host machine (Windows 8) I am using the C# client from https://github.com/Jroland/kafka-net. The ip of the kafka machine is correctly configured in C# code, the topic "test" is accordingly created in kafka etc. I get the following messages:
No connection to:http://:9092/. Attempting to re-connect...
Type a message and press enter...
Awaiting message from: http://:9092/
BrokerRouter: Refreshing metadata for topics: test
Failed re-connection to:http://:9092/. Will retry in:1000
Failed re-connection to:http://:9092/. Will retry in:2000
Failed re-connection to:http://:9092/. Will retry in:4000
The same client connects to a physical linux machine with kafka.
I would like to be able to develop with kafka running as a virtual machine. How could I solve the communication issue?
Thanks
I never used the c# version, but is your producer configure correctly?
From the error message, it seems that it doesn't have the IP/DNS configured...
No connection to:http://:9092/
I'd like to write some application to manage vSphere environment but first I want to try SDK_5.5 Samples. After building solution I tried to run simpleclient.exe and I've received following message: "Could not establish a trust relationship for the SSL/TLS secure channel".
Here is the command I'm typing to run the program:
SimpleClient.exe --url https://192.168.xxx.xxx/sdk --username administrator#vsphere.local --disablesso
I've installed esxi 5.5 and vCenter with default settings. Is there something i'm missing with certs?
Wired thing... The problem was I didn't place username in " "... after that everything works fine.