SSH配置与修改

ssh文件路径:/etc/ssh/
ssh的日志文件:/var/log/secure
端口修改:./sshd_config
服务启停: service sshd start/stop/restart

git以ssh方式clone

ssh key 生成可参考
http://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin
http://blog.csdn.net/wangmuming/article/details/22925873

git clone ssh://git@gitlab.xxxxxx.cn:6911/project/projectName.git

当ssh端口变动时,主要有两处变化:
1、增加了 ssh://
2、指定了ssh服务的端口 6911

打通服务器间的公私钥免密登录

必须的要求:
SSH doesn’t like it if your home or ~/.ssh directories have group write permissions. Your home directory should be writable only by you, ~/.ssh should be 700, and authorized_keys should be 600.
You can also get around this by adding StrictModes off to your ssh_config file, but I’d advise against it - fixing permissions is the way to go.
即有几处是需要处理(注意)的:
1、用户家目录组用户权限不能有写(W)权限,如/home/oper目录,可以是755.
2、~/.ssh 目录权限应该是700,~/.ssh/authorized_keys 文件权限应该是600.

转载于:https://www.cnblogs.com/hailongchen/p/6841092.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值