随笔分类 -  linux

摘要:1 stop firewalld 2 install iptables 3 accept 80, 22, 8080 4 drop attack ip 5 limit speed 5 save and restart iptables 阅读全文
posted @ 2018-09-21 11:49 idlewith 阅读(160) 评论(0) 推荐(0)
摘要:/etc/ssh/sshd_config generate client public and private key Step 3 prevent user from login by password /etc/sshd/sshd_config modify mode 阅读全文
posted @ 2018-09-20 23:51 idlewith 阅读(163) 评论(0) 推荐(0)
摘要:``` #!/usr/bin/env python import sys, paramiko hostname = '' password = '' command = 'ls' username = "" port = 22 try: client = paramiko.SSHClient() client.load_system_host_keys() clie... 阅读全文
posted @ 2018-09-19 23:32 idlewith 阅读(118) 评论(0) 推荐(0)
摘要:``` dd if=/dev/zero of=/swapfile1 bs=1024 count=524288 mkswap /swapfile1 swapon /swapfile1 vi /etc/fstab # edit /etc/fstab file, add the following line /swapfile1 none swap sw 0 0 # save and qui... 阅读全文
posted @ 2018-09-11 12:33 idlewith 阅读(234) 评论(0) 推荐(0)
摘要:1 fdisk l query storage information include device name and capacity 2 confirm /dev/bala is existed file system /dev/bala: data 3 craete physical volu 阅读全文
posted @ 2018-08-06 14:21 idlewith 阅读(143) 评论(0) 推荐(0)
摘要:``` telnet server_ip port ``` ``` nc -vz server_ip port ``` ``` ssh -v -p 4750 root@127.0.0.1 ``` 阅读全文
posted @ 2018-04-23 10:59 idlewith 阅读(98) 评论(0) 推荐(0)