User Tools

Site Tools


сервис_ssh

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
сервис_ssh [2024/03/14 11:07]
val
сервис_ssh [2024/05/03 08:47] (current)
val [SSH вместо VPN (привязка к порту сервера)]
Line 40: Line 40:
 ===== Настройка ssh сервера ===== ===== Настройка ssh сервера =====
 <​code>​ <​code>​
-gate# cat /​etc/​ssh/​sshd_config+gate# cat /​etc/​ssh/​sshd_config.d/my.conf
 </​code><​code>​ </​code><​code>​
-... 
 Port 2222 Port 2222
-...+
 DenyUsers "​user*"​ DenyUsers "​user*"​
-...+
 PermitRootLogin yes PermitRootLogin yes
-...+
 #​KexAlgorithms +diffie-hellman-group1-sha1,​diffie-hellman-group-exchange-sha1 #​KexAlgorithms +diffie-hellman-group1-sha1,​diffie-hellman-group-exchange-sha1
 #​HostkeyAlgorithms +ssh-dss,​ssh-rsa #​HostkeyAlgorithms +ssh-dss,​ssh-rsa
-... 
 </​code>​ </​code>​
  
Line 185: Line 183:
 </​code><​code>​ </​code><​code>​
 # cat /​proc/​sys/​net/​ipv4/​ip_local_port_range # cat /​proc/​sys/​net/​ipv4/​ip_local_port_range
 +  или
 +# sysctl net.ipv4.ip_local_port_range
  
 lan# ssh -N -R 61022:​localhost:​22 -o ServerAliveInterval=60 user1@server.corpX.un lan# ssh -N -R 61022:​localhost:​22 -o ServerAliveInterval=60 user1@server.corpX.un
сервис_ssh.1710403657.txt.gz · Last modified: 2024/03/14 11:07 by val