标签:linux

SSH 提示WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

May 20, 2020 · Linux
1. 提示如下[root@ansible root]# ssh 172.21.21.252@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!Someone could be eavesdropping on you right now (man-in-the-middle attack)!It is also possible that the RSA host key has just been changed.The fingerprint for the RSA key sent by the remote host isc7:10:34:25:4d:7a:05:59:4a:3

Shell 获取本机IP地址

May 12, 2020 · Linux
CentOS 6.5相对于CentOS 7中的ifconfig命令多了addr:字符1. 获取以"172."或"10."开头的IPifconfig|grep inet|grep -v inet6|awk '{print $2}'|tr -d "addr:"|grep -E "^172\.|^10\."2. 获取除回环地址之外的所有IPifconfig|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"

My PS1

May 9, 2020 · Linux
export PS1='\e[32;1m[\u@\h \w]\$\e[0m '

Linux 换各种源

May 6, 2020 · Linux
1. PyPI (PIP)1.1. 直接修改配置文件mkdir ~/.pipecho -e "[global]index-url = https://mirrors.aliyun.com/pypi/simple/[install]trusted-host=mirrors.aliyun.com" > ~/.pip/pip.conf1.2. 通过pip config命令修改(pip>=10.0.0)pip install -i https://mirrors.aliyun.com/pypi/simple/ pip -Upip config set global.index-url https://mirrors.aliyun.com/pypi/simple/