SSH Linux

Secure Shell

6

SSH (Secure Shell) - , . SSH , . SSH , .

   SSH  Linux

OpenSSH

SSH-, , OpenSSH . , Linux, OpenBSD, Windows macOS. OpenSSH Linux , ssh, .

sudo apt install openssh-client

IP- . SSH- ssh, IP-:

ssh 192.168.56.101

:

ssh test.server.com

:

ssh 192.168.56.101

yes Enter. , .

SSH-

SSH . SSH-, :

ssh username@hostname_or_ip

:

ssh testuser@10.0.0.55
. Connection refused, , .

SSH-

SSH 22. SSH , . :

Connection refused

SSH, -p. :

ssh test.server.com -p 3322

SSH SSH Keygen

SSH, keygen. . , .

SSH . SSH, .

- :

ssh-keygen -t rsa

, Enter .


SSH

SSH, . - id_rsa.pub, SSH.

, :

ssh-copy-id hostname_or_IP

, .

, . .


SSH SCP

SSH SCP. :

scp fileName user@remotehost:/home/username/destination

, sample3 , :

scp sample3 test@10.0.10.5:/home/test/Desktop

.

scp sample3 test@10.0.10.5:/home/test/Desktop

-P , .


SSH

, SSH. sshd_config, SSH. , . - .

, . . Linux vim.

:

sudo vim /etc/ssh/sshd_config

sudo, , .


SSH

SSH, Linux.

Linux , :

sudo ssh service restart

:

sudo sshd service restart

, , . SSH .


. . , SSH .

, SSH. , , :

ssh test.server.com rm ~/Desktop/Dir1/sample4

, .


SSH

SSH . SSH .

  • -1 - ssh 1
  • -2 - ssh 2.
  • -4 - IPv4.
  • -6 - IPv6.
  • -A - . .
  • -a - .
  • -b bind_address - , .
  • -C - . .
  • -c cipher_spec - . .
  • -E log_fileName - log_file .
  • -f - ssh .
  • -g - , .
  • -q - ssh . .
  • -V - ssh .
  • -v - ssh-. .
  • -X - , X11.
  • -x - X11.

50% Merion Academy