IT/linux
리눅스(linux) centos7 SSH
역신
2022. 7. 8. 13:16
SMALL
설치
yum install openssh-server
설치확인
whitch sshd
config
vi /etc/ssh/sshd_config
방확벽 centos7
firewall-cmd --zone=public --add-port=22/tcp --permanent
실행
service sshd start
ps -ef | grep ssh
ssh -p 22 admin@192.168.218.102
shutdown -h now
systemctl disable firewalld
df -hP | awk 'BEGIN {printf"{\"discarray\":["}{if($1=="Filesystem")next;if(a)printf",";printf"{\"mount\":\""$6"\",\"size\":\""$2"\",\"used\":\""$3"\",\"avail\":\""$4"\",\"use%\":\""$5"\"}";a++;}END{print"]}";}'
LIST