socket connection not getting from linux to windows platform - linux

I using socket in java. the data is coming from server which is on linux machine and i want to get that data to window using socket. on same linux to linux socket connect but linux to window connection is getting. so please tell me the solution.... is there any other library required or something else?
Also how to solve pragma pack issue in java?

Related

Using XRDP to connect linux to Windows PC from LINUX Client

Has anyone successfully used XRDP/freeRDP to remote login to a Windows PC from a LINUX Client? I did some research on the matter and I found there may be incompatibility issues. However those posts were quite old.
I would like to use the latest XRDP or freeRDP
The site says the following:
"The goal of this project is to provide a fully functional Linux terminal server, capable of accepting connections from rdesktop, freerdp, and Microsoft's own terminal server / remote desktop clients.
Unlike Windows NT/2000/2003/2008/2012 server, xrdp will not display a Windows desktop but an X window desktop to the user.
So it sounds like I can communicate between a Linux Box and Windows. But it sounds like the Windows PC can only be the client logging into a Linux Server and not vice-versa."
Is this true?
That's not true. You can using a freeRDP client in Linux connecting to a server on Windows. I've just tried the latest freeRDP code in Ubuntu, and I've tested Win7/Win10, both are OK.
Follow the instruction of freeRDP in the following link:
https://github.com/FreeRDP/FreeRDP/wiki/Compilation
and hope you make it.
Ps: There may be some connectivity issues, like firewall or something, just google it.

SSH Protocol error: Server and client capabilities don't match

I am facing an issue in deploying my Qt GUI executable on to the iMx6 target. I am running Ubuntu 12.04 on VMWare, and launching the Qt executable using Qt Creator 3.1.2 (running Qt 5.3.1 cross compiled for iMx6 platform). The error message displayed was:
19:08:58: Could not connect to host: SSH Protocol error: Server and client capabilities don't match. Client list was: ssh-rsa,ssh-dss.
Server list was ecdsa-sha2-nistp256.
Is the device connected and set up for network access?
19:08:58: Deploy step failed.
Error while building/deploying project qtGUI (kit: Target)
When executing step 'Check for free disk space'
19:08:58: Elapsed time: 00:02.
It is purely some problem related to network connection ? or something that am missing here ?
Any help is appreciable. Thanks.
Your server just allows certificates using ecdsa-sha2-nistp256, while your client just allows ssh-rsa and ssh-dss. Since there is no match between both lists, its not possible to connect to the server.
Your server wants to exchange keys explicitly using Elliptic Curve nistp256. Your client does not know about this method, therefor denies the key-exchange. you will have to update your client SSH certification methods (update ssh clientlibrary) or set your server to allow other certification methods.
I got the same problem when I wanted to connect to the board PicoCOMA9X (NXP i.MX6) through SSH in Qt creator and could solve it in the following way:
Delete all of host keys generate in your board. They are usually located in /etc/ssh. You can use rm ssh_host_*.
Restart the ssh session by using /etc/init.d/S50sshd restart.
Then check the IP, username and password of the board in Qt, and test the connection.

RPC from Windows to linux

Is there some (working) example how to create RPC from windows to linux?
Client should be windows NT application, server is linux.
It needs to be MSRPC.
No Corba, no XML-RPC, SUN-RPC etc
MSDN says this:
RPC can be used in all client/server applications based on Windows
operating systems. It can also be used to create client and server
programs for heterogeneous network environments that include such
operating systems as Unix and Apple.
Unfortunately after spending few hours on google I'm giving up.
My expectation:
Linux node should have samba installed, because their MSRPC implementation works.
Using IDL file I generate stubs for both client and server
Client is built using MSVC
Server is build using gcc with some includes/libraries from samba (or other libs)
Linux node must have such RPC port mapper
Can someone point me out?
I think you have 2 possible ways to deal with this:
1- You can try using DCOM with wine, which means that you will actually write your code for windows, but at the same time you can test your results in the process and avoid using WinAPI calls that wine is not able to handle properly. This approach will allow you to generate stubs code from your IDL files.
2- You can try using Samba RPC Pluggable Modules, but I am afraid in this case the RPC communication will be more primitive.
Edit:
It seems there are many other ways. I found a list of libraries in DCOM-Wikipedia, j-Interop for example looks particularly promising.

How to transfer a live data stream from a linux headless system to a windows machine?

I've recently been working with the NAO. We're trying to connect the NavChip to it and do some experiments related to robot navigation. The NAO uses a modified 2.6 linux kernel on it's geode system. I've managed to make my NavChip work on it (needed to compile the linux cp210x kernel module etcetera). I can therefore run a C program that came with the NavChip and collect data from it. However, the data can only be logged on the local file system. I'd like to stream this data over the network to a windows machine, since all the processing is MATLAB based. Would anyone have any suggestions on how I can send this data from the NAO to a windows machine?
The NAO's system is pretty limited. It has ssh, and some common utilities like cat etc., but nothing advanced.
I'm not sure I understand the problem properly but I think you've answered your own question you mentioned ssh is installed so why not just scp the file? Using some ssh client on the windows box to remotely connect and download relevent log file.
If you really do need to push the file from the remote host to local machine (rather then connect to remote host and download to local) then netcat should work see here: http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/
Other wise just write your own socket program in C and pipe the file accross (should be pretty trivial).

Winsock - 10038 Error - Win2K3 Server - baffling behaviour

Attempt to send a message through a socket failed with WinSock error 10038. After around 40 seconds, messages are received successfully from the same socket and subsequently the send() is also succeeding in the same socket. This behaviour has been witnessed in Windows Server 2003. Is this any known behaviour with WinSock and Windows Server 2003?
Winsock error 10038 means "An operation was attempted on something that is not a socket".
Little trick to find info about error codes (usefull for all sorts of windows error codes):
Open a command prompt
Type "net helpmsg 10038"
What language is your application written in? If it's C/C++, could it be that you are using an invalid socket handle?
Thanks so much to a_mole for the idea of checking for layered winsock providers. We are having problems with some of our PC's and TimesTen DB. When we try to setup and ODBC Client DSN, we get a 10038 error. On examining the netsh output from the affected PC's, we found that they have Embassy Trust Suite by Wave Systems installed. Evidently Dell pre-installed this on some of their PC's. Anyway, on uninstalling this software, the problem has been solved.
Thanks again
Lou
Not a platform issue, I can guarantee that. Most likely, whatever variable you are using to access the socket handle is not thread-safe and is being used in the send() call before the actual socket is created.
Another possible cause is the presence of layered winsock providers. "netsh winsock show" at a cmd prompt will show you the installed providers and you can try removing any non-microsoft ones.

Resources