Linux Windows SSH
SSH to Windows/Linux
, , , . , :
- Secure Shell (SHH) Linux
- (RDP - Remote Desktop Protocol) Windows
. , , , .
, :
- IP- ,
SHH?
Secure Shell, Secure Socket Shell, - , .
SSH , , , .
, , .
SSH?
, SSH-, : . , , SSH , , . , , , .
, SSH (SSH daemon - sshd). TCP/IP . , SSH , , .
SSH SSH SSH 2.
SSH-
SSH- , , , . OpenSSH SSH , Linux. OpenSSH . , . , Ubuntu SSH- .
OpenSSH
SSH, , . Linux . Windows PuTTY , .
, Linux, :
- SSH. CTRL+ALT+T .
-
ssh
Enter. - , :
username@host:~$ ssh usage: ssh [-1246AaCfGgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] [-D [bind_address:]port] [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11] [-i identity_file] [-J [user@]host[:port]] [-L address] [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] [-Q query_option] [-R address] [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]] [user@]hostname [command] username@host:~$
, . OpenSSH:
- , OpenSSH :
sudo apt-get install openssh-client
- Enter, .
SSH , , IP-.
OpenSSH
, SSH-, SSH.
, OpenSSH Ubuntu , SSH-, :
- . CTRL+ALT+T .
-
ssh localhost
Enter. - , SSH-, :
username@host:~$ ssh localhost ssh: connect to host localhost port 22: Connection refused username@host:~$
, OpenSSH. :
- , SSH:
sudo apt-get install openssh-server ii
- .
- Enter
Y
, .
, , SSH- , :
sudo service ssh status
, SSH :
username@host:-$ sudo service ssh status ssh.service - OpenBSD Secure Shell server Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enab Active: active (running) since Fr 2018-03-12 10:53:44 CET; 1min 22s ago Process: 1174 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCES Main PID: 3165 (sshd)
, OpenSSH , ssh localhost
. :
username@host:~$ ssh localhost The authenticity of host 'localhost (127.0.0.1)' can't be established. ECDSA key fingerprint is SHA256:9jqmhko9Yo1EQAS1QeNy9xKceHFG5F8W6kp7EX9U3Rs. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts. username@host:~$
yes
y
, .
! SSH- SSH.
SSH. , SSH-. :
sudo nano /etc/ssh/sshd_config
, . Nano. Nano, :
sudo apt-get install nano
, SSH , - sshd_config
. , :
sudo service ssh restart
SSH
, OpenSSH, , . :
- SSH- :
ssh your_username@host_ip_address
. , , :ssh host_ip_address
Enter. - Enter. , . , , , .
- , , .
yes
Enter. ( ), . - ECDSA , .
, , , , IP- IP-. IP-. , , TCP-, OpenSSH , . 22
, sshd_config
. IP- .
OpenSSH :
username@machine:~$ ssh phoenixnap@185.52.53.222 p7654 phoenixnap@185.52.53.222s password: The authenticity of host '185.52.53.222 (185.52.53.222)' can't be established. ECDSA key fingerprint is SHA256:9lyrpzo5Yo1EQAS2QeHy9xKceHFH8F8W6kp7EX2O3Ps. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added ' 185.52.53.222' (ECDSA) to the list of known hosts. username@host:~$
. , , :
- IP-
- , SSH,
- SSH
SSH
, SSH, SSH. , , .
SSH sshd
:
- TCP- , SSH.
22
, ,24596
. , , ,222
,2222
22222
. - SSH SSH . , . .
- . , . , , .
- root-
su
root-.
TCP Wrappers IP- . , TCP Wrappers, /etc/hosts.allow
etc/hosts.deny
.
, . , SSH- , , etc/hosts.deny
:
sshd : ALL ALL : ALL
etc/hosts.allow
SSH. IP-, IP- : sshd: 10.10.0.5, LOCAL
.
, , . , SSH , , , , . - Fail2ban.
VNC SSH
, (VNC - Virtual Network Computing), SSH. VNC SSH, Linux UNIX:
$ ssh -L 5901:localhost:5901 -N -f -l username hostname_or_IP
:
ssh
: SSH SSH .-L 5901:localhost:5901
: , . 5901 .-N
: , .-f
: SSH , . .-l
username: .hostname_or_IP
: VNC. IP-172.16.0.5
,myserver.somedomain.com
.
SSH- Windows, PuTTY. PuTTY :

- Connections () -> SSH -> Tunnels ()
- Source port ( )
5901
- Destination ()
localhost:5901
- SSH
- VNC
RDP?
(RDP - Remote Desktop Protocol) , Microsoft. Windows.
Secure Shell, , RDP-, , , .
, , , .
. (VPN - virtual private network), RDP , SSH, . , , , Windows. . RDP , .
?
Windows - (RDP). Windows 3389
. , Windows, , . , , , .
, Windows, , . , , Pro, Enterprise Server Windows. , , RDP- Windows.
RDP-
Windows. Windows, , Windows. Windows.
, , , :
- . VPN, , IP- . , , TCP- ( 3389) IP- , . , Windows .
- VPN. . , .
- . , , , . RDP, .
Windows 7, 8, 10 Windows Server
Windows. . , , , , VPN .
1.
, :
- Computer ( ) This PC ( ) Windows.
- Properties ().
- Remote settings ( ) .
- Allow remote connections to this computer ( ). . , Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended) ( , ()) RDP.
- Apply (), , , .
2. .
, , , . , , . :
- Remote Settings ( ), , Select Users ( )
- Add () Remote Desktop Users ( ).
- Select users ( ). , , Locations ().
- Enter the Object Names to Select ( ) Check Names ( ).
- , OK.
- System Properties ( ), .
, . , .
, . Windows, Windows 7.
1:
Windows Remote Deskrop Connection ( ). :
- Windows 7 Start () -> All Programs ( ), Accessories () Remote Desktop Connection ( ). Windows 10 Start () Windows Accessories ( Windows), Remote Desktop Connection ( ).
- Start () Remote Desktop Connection ( ) . , . , .
- Windows + R , Run (). mstsc Open () Enter, .
2. IP- .
Remote Desktop Connection ( ) , IP- , .
Computer () IP- Connect ().

. (3389
) , IP-.:174.163.152.141:6200
IP- . :
- , IP- .
- (VPN) , IP- .
- VPN, IP-.
IP-
, IP- , . :
IP- :
IP- :
:
- Computer ( ) This PC ( ), Windows.
- Computer name, domain, and workgroup settings ( , ).
3. RDP
, Connect (), . , , :

- . .
- OK, , .
- Yes (), .
. Windows . - , , . .
. , .
RDP. , .
, , :
- VPN- Windows . Windows.
- . Not configured ( ). . Client Compatible ( ). High (), 128- , . .
- .
- , RDP , TCP- RDP
3389
, . Windows , IP-
RDP . , .
, , Linux Windows. Linux Windows.
, , .