Can you please indicate how can I enable SHA 256 encryption during SFTP connectivity. Currently I am using below code to connect to SFTP. Thanks in advance for your help.
SSHFTPClient ftp = new SSHFTPClient();
ftp.setRemoteHost("hostname");
ftp.setRemotePort(23);
ftp.setAuthentication("username", "password");
ftp.getValidator().setHostValidationEnabled(false);
ftp.connect();
Try:
ftp.setAlgorithmEnabled(SSHFTPAlgorithm.MAC_SHA2_256, true);
See here for an example.
Related
I got a weird situation here, not sure if its a bug in .NET Core or my brain.
using IPEndPoint to store the destination IP:port in my class, I use a TcpClient to connect.
IPEndPoint _ipendpoint = IPEndPoint.Parse("127.0.0.1:5000");
TcpClient tcp1 = new TcpClient(_ipendpoint);
Tcpclient tcp2 = new TcpClient(_ipendpoint.Address.ToString(), _ipendpoint.Port);
tcp1 gives SocketException, tcp2 does not. (comment one out to test the other)
So whats the deal here?
Ok, found it. So much NOT understandable why MS implemented it this way.
Answer here: link
In short words: while they seem to be equal (both provide an address and port) one connects TO the address as client, the other binds to the address (opens the port on the local machine).
This doesnt get really clear from the MSDN documentation. Also, would you expect TcpClient to act as server? Bad, bad design decicions.
I have a VPN configured by ovpn in my mikrotik that already works, but whenever I connect both by android and Windows, I get the error:
ovpn,debug,error,,,,,,,,,l2tp,info,,debug,,,critical,,,,,,,,,,,,,warning duplicate packet, droppin
On console and terminal:
I have already looked for the official forum of mikrotik but neither has no clear answer or a definitive solution.
My goal is to remove this error from my terminal and from my console log.
My current setting:
OVPN SERVER:
PPP PROFILE:
#Edit:
After contacting support, I got this error message to have no impact on the VPN. Below is the email from Mikrotik Support:
Email:
"Hello,
This error message does not have any impact on the VPN connection
establishment, it simply warns you that the client sent duplicate
message which some client software (for example Windows) do.
Best regards, Emils Z."
Thank you all for your help.
I would advise that this is probably a bug in the OVPN implementation on Mikrotik's side. Please log a support ticket with them, and provide the supout.inf file as per the usual process.
Please see this link on how to make the support info file:
https://wiki.mikrotik.com/wiki/Manual:Support_Output_File
In short, open winbox, click the make support file on the left, and then go to files and download the file to your pc. Then attach this file to the support ticket.
I am using TLS_RSA_WITH_3DES_EDE_CBC_SHA cipher suite, and I have sucessfully finished the handshake process, so i should have the correct KEYS for the server side and client side, but when i use the server write key and iv to encrypt the data and put under record layer(applicaiton type) send to client, but when i use wireshark ssl debug, i found out that wireshark didn't decrypt the application data correctly, wonder is the application data use a different key to do the encryption and decryption? Thanks
I have finally found the problem, TLS 1.0 used the last block of encrypted data as new IV to encrypt the data. its a little surprised, the encrypted data is visible on the network, so anyone capture that data can find out the IV.
I'm working with freeswitch and I made the connection between my server and another one, for hearing each other I used the codec G729. The issue is the next: I call them, the call is established and I can hear the other part perfectly but they can't hear me and they can see the audio packets coming to their server but they can't hear me, any idea? Thanks!
I'd start by looking at the firewall on the remote machine. libpcap will allow you to see all packets hitting the box before the firewall rules are applied, so it can be a little deceptive. So there's a good chance that the firewall is blocking the packets.
Also, you didn't specify what the other user is connecting to their server with, and how. So if they're connecting to their server from behind NAT, then you could just be experiencing the typical one-way audio issues so common with NAT scenarios. Check out http://wiki.freeswitch.org/wiki/Nat for more info.
This issue doesn't seem to be directly related to the g.729 codec or you'd have most likely gotten a 488 SIP response.
It's possible that the person on the other end isn't able to decode the the G729 stream.
What kind of phone are they using?
I would google that phone model and try a known supported codec for it.
Then I would setup your Freeswitch to encode for that codec.
If that works then it's likely an issue with the phone.
Hope this helps.
How can I check latency between server and client using asp.net. I would like to ping the server from the client and get back the results. Is this possible?
I can ping the ip address of the client but obvisouly this doesn't work for numereous reasons. For example on speedtest.net they check latency and report back milliseconds I would like to aceive the same thing.
string strClientIP = Request.UserHostAddress;
Ping ping = new Ping();
PingReply pr;
pr = ping.Send(strClientIP);
How about looking at http://www.aspnettutorials.com/tutorials/network/net-ping-aspnet2-csharp.aspx?
Edit: you don't really need ASP.NET here, persay. All the interesting stuff will be done with C#.
Is this more like what you're looking for?