Telegram- 👇 😉
-
. WIKIMERIONET
Merion Mertics , ,

CRM

5

SSH? SSH Connection Refused ( ), , .


SSH ?

, Connection Refused SSH. , , SSH.

, SSH.


SSH

, , SSH. , , SSH. .

, SSH, :

ssh
ssh

ssh, SSH . , , (command not found), OpenSSH.

: SSH

SSH , , .

Ubuntu / Debian:

sudo apt  openssh-client

CentOS / RHEL:

sudo yum  openssh-client

SSH

, SSH , . , , SSH- .

, SSH , :

ssh localhost

Connection refused, SSH .

Connection refused
: SSH

SSH, OpenSSH.


- SSH-. , .

, IP- .

, , SSH. , :

grep Port /etc/ssh/sshd_config

, .

grep Port /etc/ssh/sshd_config

SSH

SSH . , SSH .

, :

sudo service ssh status

, . , , , .

sudo service ssh status
: SSH

, SSH , , :

systemctl start sshd

, :

sudo systemctl enable sshd

SSH

SSH - . . , SSH, , SSH-.

, SSH-, Connection refused.

: SSH-

, , ufw (Uncomplicated Firewall - ), .

, SSH-:

sudo ufw allow ssh
sudo ufw allow ssh<

SSH

, SSH . , SSH.

, .

SSH 22. , , .

, :

sudo lsof -i -n -P | grep LISTEN

22 , STATE LISTEN.

, , , 22:

sudo lsof -i:22
sudo lsof -i:22<
: SSH

22 , iptables:

sudo iptables -A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT

, .


SSH

SSH Linux, . , SSH , , .

:

  1. 1 (-v)
  2. 2 (-vv)
  3. 3 (-vvv)

ssh [server_ip] -v :

ssh -v [server_ip]
ssh -v

:

ssh -vv [server_ip]

ssh -vvv [server_ip]