Linux 쉘에서 Windows 시스템에 연결할 수 있습니까? 연결할 수

PuTTY / SSH를 사용하여 Windows에서 Linux 시스템에 연결할 수 있습니다. 다른 방법으로 Linux에서 Windows 시스템에 연결하고 싶습니다.

이게 가능해?



답변

연결 방법에 따라 다릅니다. Windows 시스템에서 공유를 작성하고 smb / cifs를 사용하여 공유에 연결할 수 있습니다.

구문은 도메인에 있는지 여부에 따라 다릅니다.

# mount -t cifs //server/share /mnt/server --verbose -o user=UserName,dom=DOMAIN

또한 $IPC관리 공유 를 마운트 할 수 있습니다 . 프로세스 간 통신에서 $IPC공유 를 통해 수행 할 수있는 작업을 살펴볼 수 있습니다 .

항상있다 :

  • RDP
  • VNC
  • 텔넷
  • ssh
  • Windows의 Linux

마지막 3을 사용하면 추가 소프트웨어를 설치해야합니다.

VNC는 독립형 바이너리에서 실행하거나 설치할 수 있습니다.

RDP의 경우 대부분의 Linux 시스템이 이미 rdesktop설치되어 있거나 패키지 관리자에서 사용할 수 있습니다. 사용 rdesktop하면 Windows 시스템에 대한 RDP 연결 만 활성화하면 전체 GUI Windows 콘솔에 RDP를 사용할 수 있습니다.


답변

예, Linux 클라이언트에서 Windows 시스템에 연결할 수 있습니다. 그러나이를 위해서는 Windows 시스템에서 일종의 서버 (예 : telnet, ssh, ftp 또는 다른 종류의 서버)를 호스팅해야하며 Linux에는 해당 클라이언트가 있어야합니다.


답변

켜져 있으면 다음 Powershell 스크립트를 사용하여 Windows 10설치할 수 있습니다 OpenSSH.

#change dns server to 8.8.8.8 so that the OpenSSH stuff can be downloaded
netsh interface ip set dns "Ethernet" static 8.8.8.8

#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

이 스크립트는 DNS를 Google DNS로 변경합니다. OpenSSH기본 배포와 함께 배포되지 않기 때문에
Windows10실제로 인터넷에서 일부 파일을 다운로드합니다. 따라서 인터넷에 연결되어 있고 올바른 DNS 서버가 필요하기 때문에 방화벽 뒤에 있거나 DNS 서버가없는 정적 IP를 사용하는 경우 정적 DNS 서버를 지정했습니다.

이 작업을 마치면 Windows
호스트 의 IP 주소를 알아 내야합니다

ipconfig

그런 다음 Linux/UnixOS 에서

ssh username@Windows_ip

여기서 username은 계정 이름이며 Windows_ip로그인하려는 Windows 컴퓨터의 IP 주소입니다.


답변

RDP 또는 teamviewer와 같은 소프트웨어를 사용 해보고 싶을 수도 있습니다. 또한 Windows 시스템에 cygwin을 설치하고 ssh 액세스를 위해 구성 할 수 있으므로 ssh로 연결하면 Linux에서 알 수있는 쉘을 얻을 수 있습니다.


답변

안드로이드의 openssh 서버와 같은 Windows 시스템에 openssh 서버를 설치해야합니다 .iinux 시스템의 putty를 사용하여 Windows 시스템에 ssh를 사용할 수 있습니다 .netstat를 사용하여 windows 시스템에 openssh 서버를 설치할 수있는 경우 확인할 수 있습니다.


답변

창에서 git을 사용하는 경우 축하합니다. Windows 시스템에 이미 ssh 할 수 있습니다.

ssh 서버를 시작하십시오.

net start "C:\Program Files\Git\usr\bin\sshd.exe"

그런 다음이 powershell 명령을 사용하여 방화벽을 구성하십시오.

New-NetFirewallRule -Name sshd -DisplayName 'SSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22


답변