I enabled the latest openSSH on Windows 10. Successfully login using a key (since the use doesn't have any password/blank password). However the command to start a program:
start notepad.exe
or
start "C:\Program Files\7-Zip\7zFM.exe"
doesn't actually launch the program (nothing happens) when I SSH from a linux system.
However, if I ran it from the CMD from the Windows itself (logged in using SSH, ssh user#192.123.0.123 -i "key"), it ran. Why is that?
Thanks.
I was able to start OpenSSH on Windows 10 (and set to start automatically when Windows boots up) using the Services admin tool.
Firstly though, i added OpenSSH Client and OpenSSH Server through Manage optional features (search optional features using Windows Search Bar) - see Installation of OpenSSH For Windows Server 2019 and Windows 10.
After OpenSSH was installed i started it. You can get to it easily by typing "services" into the Windows Search Bar, scroll down and find "OpenSSH SSH Server", right click and click "Start".
You can also set the service to start automatically by right clicking, select Properties and set Startup type "Automatic".
Related
As the title already summarizes:
How can I start a bash-script automatically, when the computer starts - ideally without the need to log in to windows - using the Microsoft Subsystem for Linux's Bash.
At the moment, this isn't supported, because the WSL session manager service will close after the last bash.exe wrapper instance closes. There are a few options, but the absolute simplest one at the moment is to use the run utility from the Xming developer and just add a shortcut to your startup folder (in the start menu) pointing to
run.exe bash.exe -c "/home/user/daemoninit.sh ; /bin/bash". Unfortunately, if your daemon initialization requires root access, for example, something like sshd, you will need to add an exception to sudoers that allows anybody to run the daemon with root privileges.
Also, there are problems getting it to run as a true Windows system service, since each lxss installation is user-specific. Some people have gotten it to run on system startup, but it launches in a separate Windows session for that user and makes it so you can't launch bash.exe in your current user session.
I want VMWARE to start automatically when I restart Windows 7.
So, I want the command line for this in a .bat file that my Windows startup can call.
I've just noticed you mentioned what VMware Application you're using in question's subject.
VMware Player is now VMware Workstation Player.
I can find no topics related to this in 6.0 version, so I don't think it's possible. Anyway, you may try doing the following:
Add vmplayer.exe to Startup Programs in start menu
Register a scheduled task "On Startup" for vmplayer.exe
Run vmplayer.exe from it's root folder via cmd, that would be something like
C:\Program Files (x86)\VMware\VMware Player\vmplayer.exe
If you're trying to start a virtual machine, you can do it by running the command above plus adding the "-x" parameter, as said just in Workstation Documentation, page 486.
I hope it helps!
There is a couple of bugs in the installer of VMWare player 6. You should swap these values in the Windows registry :
HKEY_CLASSES_ROOT\Applications\vmplayer.exe\shell\open
HKEY_CLASSES_ROOT\Applications\vmplayer.exe\shell\open\command
Then add this key :
HKEY_CLASSES_ROOT.vmx\OpenWithList\vmplayer.exe
Assuming your Virtual image is in C:\Users\stackoverflow\, your batch file should be similar to this :
start "" /low "C:\Program Files (x86)\VMware\VMware Workstation\vmplayer.exe" "C:\Users\stackoverflow\Win10.vmx"
Assuming the open verbs are correctly set in the registry (see #Doe Doe's post) you can just use:
start "path\to\my_vm.vmx"
I created an SSH session into my localhost through PuTTY. I am running OpenBSD server on the localhost which is a Windows 7 machine. The login was successful. Now I want to start programs in the PuTTY shell for example notepad.exe. I changed the directory to c:\windows\system32. The command start notepad runs without error but I don't see any window.
Is the notepad running in the background without a windows. If yes, how to make the window visible??
Yes, it's quite likely the Notepad is run in an invisible Windows session on the server. Note that it does not make a difference in this case that the server is the local machine.
If you hoped for the window to appear on the "local" machine magically, you are out of luck.
Generally, it's possible to run a GUI application on remote machine and see the GUI locally. On Unix it's quite common. Typically X Window is used for that.
But Windows GUI applications cannot be "tunneled" via SSH session to a local machine.
First of all I have spent over 4 hours researching this topic..
So I have a Windows 2008 r2 root server at the moment. I connect to it via Remote Desktop.
Now I want to write a program that runs batch files on the server but the program is at client side, I have tried to setup an SSH server on my Windows server with Freesshd.
That seems to work but the programs are not shown. (In Taskmanager are they)
Is there way (prefer SSH) to let them show normally?
The goal is to restart programs (Gameservers).
My Program will work so: if I press restart server it will connect (if SSH) via Putty to the server to exec the batch file.
Or will start another program with parameters something like this:
Clientprogramm -ip 95.25.115.** -user Administrator -p xxxxxx C:\gameserverdir\start.bat
Simple and fine. I have done that already for Linux and there it isn't that hard.
So if you have an idea that can help me would be nice to know.
Both system are Windows!
If you are using SSH, the tool you need is plink. It's putty for command line.
Or, as indicated in comments, you can use psexec, or powershell, or vbscript, or .... BUT started programs are only "visible" in the same session from where they were started.
I am new to the whole Windows world. I have downloaded plink.exe from Putty's website. I am executing a plink command from the Windows Server 2008 R2(64 bit) which would execute a shell script in a Linux box.
The plink command is executed from a .dtsx package which is running as a daemon job on the Windows Server. I have accepted the host key into the registry for the Linux box using Putty and I can see it in the registry.
The command executes when I RDP into the server but does not when I am not logged in. It hangs and creates a "conhost.exe" process which stays there. I can see the "plink.exe" and "conhost.exe" in the task manager on the server.
Here is the kind of command I am running.
plink.exe user#SERVERNAME -pw password ./script_name.sh param_1 param_2 param_3
Has anybody faced/or is facing any problem like this?