标签:ddr pad secure author etc foreign TE 公钥加密 protocol
[root@localhost ~]# rm /etc/ssh/ssh_host* [root@localhost ~]# service sshd restart Redirecting to /bin/systemctl restart sshd.service [root@localhost ~]# date Tue Jul 11 21:46:05 EDT 2017 [root@localhost ~]# ll /etc/ssh/ssh_host* -rw-r-----. 1 root ssh_keys 227 Jul 11 21:45 /etc/ssh/ssh_host_ecdsa_key -rw-r--r--. 1 root root 162 Jul 11 21:45 /etc/ssh/ssh_host_ecdsa_key.pub -rw-r-----. 1 root ssh_keys 387 Jul 11 21:45 /etc/ssh/ssh_host_ed25519_key -rw-r--r--. 1 root root 82 Jul 11 21:45 /etc/ssh/ssh_host_ed25519_key.pub -rw-r-----. 1 root ssh_keys 1675 Jul 11 21:45 /etc/ssh/ssh_host_rsa_key -rw-r--r--. 1 root root 382 Jul 11 21:45 /etc/ssh/ssh_host_rsa_key.pub [root@localhost ~]# netstat -tlnp | grep ssh Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 16016/sshd tcp6 0 0 :::22 :::* LISTEN 16016/sshd
[root@www ~]# sftp student@localhost sftp> lls /etc/hosts /etc/hosts sftp> put /etc/hosts Uploading /etc/hosts to /home/student/hosts sftp> ls -a . .. .bash_history .bash_logout .bash_profile .bashrc .mozilla hosts sftt> lcd /tmp sftp> lpwd Local working directory: /tmp sftp> get .bashrc Fetching /home/student/.bashrc to .bashrc /home/student/.bashrc 100% 124 0.1KB/s 00:00 sftp> lls -a . .font-unix keyring-rNd7qX .X11-unix .. .gdm_socket lost+found scim-panel-socket:0-root .bashrc .ICE-unix mapping-root .X0-lock sftp> exit
[root@localhost ~]# ssh-keygen -t rsa/dsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again:
[root@VM_6_187_centos ~]# ldd $(which sshd) | grep libwrap libwrap.so.0 => /lib64/libwrap.so.0 (0x00007f0430674000) [root@VM_6_187_centos ~]# ldd $(which httpd) | grep libwrap
[root@www ~]# vim /etc/hosts.allow sshd: 127.0.0.1 192.168.1.0/255.255.255.0 192.168.100.0/255.255.255.0 [root@www ~]# vim /etc/hosts.deny sshd : ALL
标签:ddr pad secure author etc foreign TE 公钥加密 protocol
原文地址:https://www.cnblogs.com/yangyuliufeng/p/9238075.html