Advertisement
thanh_thu

OVPN_ssh Key

Jul 13th, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. sudo openvpn --config /home/thanhthu/Abc/gateway-UDP4-4951-thuntt-config.ovpn
  2.  
  3. https://www.thuysys.com/server-vps/ssh-toan-tap/ssh-keys-authentication-bao-mat-ket-noi-ssh.html
  4. https://www.linode.com/community/questions/65/how-do-i-fix-a-no-route-to-host-error
  5. https://www.tecmint.com/fix-no-route-to-host-ssh-error-in-linux/
  6.  
  7.  
  8. ssh -p 2222 root@192.168.10.119 mkdir -p .ssh
  9. cat .ssh/id_rsa.pub | ssh -p 2222 root@192.168.10.119 'cat >> .ssh/authorized_keys'
  10. ssh -p 2222 root@192.168.10.119 'chmod 700 .ssh; chmod 640 .ssh/authorized_keys'
  11. firewall-cmd --zone=public --permanent --add-port=2222/tcp
  12. firewall-cmd --zone=public --permanent --remove-port=22/tcp
  13. firewall-cmd --reload
  14.  
  15. cat /home/thanhthu/Desktop/manhbt.pub | ssh -p 2222 root@192.168.10.119 'cat >> .ssh/authorized_keys'
  16. /home/thanhthu/Desktop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement