sftp 限制用户目录访问
sftp 限制用户目录访问

sftp 登录到指定目录 修改 sshd 配置: /etc/ssh/sshd_config #Subsystem sftp /usr/lib/openssh/sftp-server Subsystem sftp internal-sftp #修改为internal-sftp # Example of overriding settings on a per-user basis #Match User anoncvs # X11Forwarding no # AllowTcpForwarding no # PermitTTY no # ForceCommand cvs server Match User test ChrootDirectory /sftpdata/test X11Forwarding no AllowTcpForwarding no PermitTTY no ForceCommand internal-sftp #指定sftp命令,ssh不可以登录 Match Group sftpgroup... » read more

push image to ecr
push image to ecr

我们将 docker 镜像仓库由 harbor 改成 AWS ECR,如何推送镜像? Retrieve an authentication token and authenticate your Docker client to your registry. Use the AWS CLI: aws ecr get-login-password --region ap-east-1 | docker login --username AWS --password-stdin <aws account>.dkr.ecr.<region>.amazonaws.com 如此我们不仅要改变原有 DSL 结构,并且还需要手动安装 aws cli , 还有安全凭证泄露的风险。 我们在不改变原有结构的情况下,同时兼容两种镜像仓库的管理呢? Amazon ECR 插件实现了 Docker Token 生成器,将 Amazon 凭证转换为 Jenkins 的 API,该... » read more