shell

2016-10-31  本文已影响0人  普通市民王二狗

常用指令

echo "hello" > hello
cat hello

打包压缩

用户和权限

user:x:500:500:User:/home/user:/bin/bash
elasticsearch:x:496:493:elasticsearch user:/home/elasticsearch:/sbin/nologin
www:x:501:501::/home/www:/bin/bash
logstash:x:495:492:logstash:/usr/share/logstash:/sbin/nologin
redis:x:494:491:Redis Server:/var/lib/redis:/sbin/nologin
gitosis:x:493:489:git repository hosting:/var/lib/gitosis:/bin/sh
gituser:x:502:502::/home/gituser:/bin/bash

登录名-口令占位符-UID-GID-私人信息-用户主目录-shell

远程登陆

ssh -l wpy 196.128.75.130
exit
默认开在22端口,可以-p改
ssh -l wpy -p 222 196.128.75.130
ssh-keygen -t rsa 生成rsa密钥
id_rsa 私钥
id_rsa_pub 公钥
复制公钥到远程主机,重命名
/.ssh/authorized_keys
上一篇下一篇

猜你喜欢

热点阅读