I can connect to Linux machines from Windows using PuTTY/SSH. I want to do the other way round - connect to a Windows machine from Linux.
Is this possible?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
It depends on how you want to connect. You can create shares on the Windows machine and use smb/cifs to connect to the share.
The syntax would depend based on if you are in a domain or not.
# mount -t cifs //server/share /mnt/server --verbose -o user=UserName,dom=DOMAIN
You also have the ability to mount the
$IPC and administrative shares. You can look into Inter-Process Communication for what you can do via the
There is always:
With the last 3 you need to install additional software.
VNC can be run from a stand-alone binary or installed.
For RDP most Linux systems either already have
rdesktop installed or it is available in the package manager. Using
rdesktop you only have to enable RDP connections to your Windows system and then you will be able to use RDP for a full GUI Windows console.
Yes, you can connect to Windows Machine from Linux client. But for that you have to host some kind of server(i.e. telnet, ssh, ftp or any other kind of server) on Windows machine and you should have the corresponding client on the Linux.
If you are on
Windows 10, you can install
OpenSSH using the following
#change dns server to 188.8.131.52 so that the OpenSSH stuff can be downloaded netsh interface ip set dns "Ethernet" static 184.108.40.206 #sleep for 60 s so that the DNS server has time to register Start-Sleep -m 60 #check if OpenSSH is already installed or not Get-WindowsCapability -Online | ? Name -like 'OpenSSH*' # Install the OpenSSH Client Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0 # Install the OpenSSH Server Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 # Check if OpenSSH is available dism /Online /Get-Capabilities | findstr OpenSSH # install the server and/or client features: dism /Online /Add-Capability /CapabilityName:OpenSSH.Client~~~~0.0.1.0 dism /Online /Add-Capability /CapabilityName:OpenSSH.Server~~~~0.0.1.0 Install-Module -Force OpenSSHUtils Repair-SshdHostKeyPermission -FilePath C:\Windows\System32\OpenSSH\ssh_host_ed25519_key # start the ssh server daemon Start-Service sshd # This should return a Status of Running Get-Service sshd # add firewall rule to allow inbound and outbound traffic through port 22 New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Service sshd -Enabled True -Direction Inbound -Protocol TCP -Action Allow -Profile Domain
Please note that this script will change the dns to Google dns. Because
OpenSSH is not distributed with the default
Windows10 distribution, it will
actually download some files from the internet. So you need a working internet
connection and a correct dns server, which is why I specified the static dns
server, just in case you are behind a firewall or using a static ip with no dns
Once you have done this, you should figure out the ip address of the
Then from the
Linux/Unix OS do
where username is the name of the account and
Windows_ip is the ip address of
the Windows computer you are trying to log into
Maybe you would like to give RDP or software like teamviewer a try. Also you could install cygwin on your windows machine and configure it for ssh access, so you'd get a shell as you know it from linux when you connect by ssh.
You should install openssh server on Windows Machine like openssh server on android.You can use putty on iinux machine to ssh to windows Machine.You can use netstat to check it after you can install openssh server on windows machine.
If you use git on windows, congratulations, you can already ssh into your windows machine.
Just start the ssh server:
net start "C:\Program Files\Git\usr\bin\sshd.exe"
Then configure your firewall with this powershell command:
New-NetFirewallRule -Name sshd -DisplayName 'SSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22