sudo apt-get install openssh-server //下载ssh服务
The following packages have unmet dependencies:
openssh-server : Depends: openssh-client (= 1:6.6p1-2ubuntu1)
Depends: openssh-sftp-server but it is not going to be installed
Recommends: ssh-import-id but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
这是因为,openssh-server是依赖于openssh-clien的,而ubuntu自带的openssh-clien与所要安装的openssh-server所依赖的版本不同,这里所依赖的版本是1:6.6p1-2ubuntu1,所以需要先下载1:6.6p1-2ubuntu1版本的openssh-client,执行以下命令下载
sudo apt-get install openssh-client=1:6.6p1-2ubuntu1 -y //下载对应版本的openssh-client
下载没报错后,执行以下命令
sudo apt-get install openssh-server -y
1、jenkins你都用了哪些插件?
比如:
ssh remote hosts 这个可以在远程服务器上面执行脚本。
Role Strategy Plugin 用来精细化管理权限。
SCM: 除CVS和Subversion外需要实现与源代码控制系统支持的插件。 3 L1 O# q2 R& _+ U3 B
Triggers: 事件监听并触发构建的插件。例如,URL改变触发器将监控一个URL;当地址内容发生改变,这个触发器就将执行一次作业。
Build tools: 实现额外构建工具的插件,如MSBuild和Rake。如果您想在Hudson中构建非Java的软件时这些就特别有用。
Build wrappers: 通常涉及时执行在受控制的构建过程本身之前和之后事件的插件。例如, VMware插件将在构建之前启动一个客户虚拟机,建立和然后在构建完成后关闭它。这在您可能需要访问VM以执行单元测试的情况下是非常有用的。
2、jenkins怎么备份恢复
只需要拷贝主home下面的 .jenkins打个包,下次要恢复就用这个覆盖,所有的东西就都一模一样了。其实就是配置的东西都在这里面,插件的话有个Plugin的文件夹下面就是所有的插件的东西。
d
最后就是恭喜你sshd服务已经下载好了
三、在jenkins上配置publish over ssh插件
1.在系统管理-->系统设置中找到publish over ssh
https://blog.csdn.net/tellmewhyto/article/details/81009148
2.1 node/agent(节点)
声明式Pipeline: 使用agent指定运行的slave节点可以是label
pipeline{
agent any
stages{
//
}
}
脚本式Pipleine: 使用node指定运行slave可以是label
node("slave"){
stage("GetCode"){
//
}
}
2.2 stage(阶段)
stage定义了在整个流水线的执行任务的概念性的不同的阶段。例如: GetCode、Build、Test、Deploy、CodeScan每个阶段
声明式pipeline: 定义stages->stage
pipeline{
agent any
stages{
stage("GetCode"){
//steps
}
stage("build"){
//step
}
}
}
脚本式Pipeline: 直接使用stage
node("slave"){
stage("GetCode"){
//
}
stage("build"){
//
}
}