How access and execute commands in Windows machine (Public IP) from Linux terminal (Public IP) - linux

I have following machines available in my center and both has public access
192.100.0.1 (This runs in Ubuntu 18)
192.100.0.2 (This runs in Windows server 2016)
And I am trying to do following actions from Ubuntu machine to Windows machine using terminal
Copy file from /var/lib/proceed/sample.jar to C:Users/usertest/Documents // This is done Edited question
Then, I want to access windows terminal from my Ubuntu terminal and execute windows command, as below
cd C:\Users\plenty\test
java -jar sample.jar
Edit : I have done with copy the file as follows,
sshpass -p 'password' scp /var/lib/proceed/sample.jar usertest#192.100.0.2:C:/Users/usertest/Documents
Installed OpenSSH in windows server to communicate from Ubuntu.
How to execute windows commands from Ubuntu terminal?

Related

copy file from ubuntu to windows server with terminal?

I want to copy file from Ubuntu operating system into windows server without program,
i used ssh ,but it did not work.

Is it possible to execute sh files GUI application from linux remote server and view it on local machine?

I have a job that runs denodo platform on remote server. Sh files is a GUI application, and I have to run it to start denodo service. I can't access it in windows, is there a way to solve these problems?
Already running sh files on Putty Windows, but only return null.
If it's a linux GUI application, you should "export display" to view the server screen on your workstation.
Depending of your workstation linux distribution, it might be as easy as :
xhost +<IP_address_of_workstation>
./runMyApp.sh
As your workstation is running windows operating system, you have do further configuration :
https://superuser.com/questions/325630/how-can-i-export-display-from-a-linux-terminal-to-a-windows-pc
https://seanthegeek.net/234/graphical-linux-applications-bash-ubuntu-windows/
If your workstation is connected through SSH you need even more configuration as discussed here : https://unix.stackexchange.com/questions/12755/how-to-forward-x-over-ssh-to-run-graphics-applications-remotely
You can run GUI-Applications of remote linux host in a windows client via ssh (putty) with x-forwarding and an installed x-server (xming)
See this question:
https://superuser.com/questions/299158/how-to-make-putty-do-the-equivalent-of-ssh-x

How can I open a x-window application on a remote machine and make that window shown in my local machine

I have a remote server running Linux and I am using macOS. I can connect to that server through ssh command. I noticed that ssh -X is used to enable X11 forwarding. So I tried to connect to that server by running ssh -X name#ip-address command and launched an application on the connection terminal. I expect that window should be shown on my macOS but it didn't. Is there any other configuration I need to set in other to make the X11 forward works?
Macs don't run their GUI in X. You need to install XQuartz first.

copy /move the Data from the Linux Command line to local windows

Installed CYGWIN in my windows, I can able to access both windows & remote linux machines with the credentials. But i can't able to configure how the data will be moved from Linux to windows, can anyone please suggest me on this.
Thanks
Srinivas
To log into your cygwin instance remotely, you need to install the sshd module in cygwin and then set it up. Then you will be able to use the ssh command on your linux/unix machine to do one of many things:
open a bash shell in your cygwin instance
execute a remote command from linux/unix using: ssh WINDOWS_SERVER command
copy to the Windows machine remotely using scp or sftp.

How do I run an desktop executable file on Windows over SSH?

Here's my situation:
I have Machine A - Linux Box, and Machine B - Windows Box using Cygwin and OpenSSH.
Currently, I can ssh between the two machines, and run programs. There is this program that I need to run on the Windows Machine that will Control the Desktop (some mouse clicks and such).
I need to be able to ssh to the Windows Machine from my Linux machine (done already) and run the program. When I do this, the program just hangs up. I can see the program in the System Processes on Windows, however it is doing nothing. When I call the program on Cygwin on the Windows machine, it runs flawlessly.
My question:
Is there a way to run the executable program on the Windows Machine that controls its Desktop environment - run it remotely over SSH?
PS: I have tried on the Windows Machine to go to Services > Cygwin sshd > Log on > Allow Services to interact with desktop. However, when this is checked I can't get the Cygwin sshd service started.

Resources