7.8. sshpass - noninteractive ssh password provider

简介:

sshpass -p 'ssh_password' ssh www.example.org

# ssh neo@192.168.6.1
The authenticity of host '192.168.6.1 (192.168.6.1)' can't be established.
RSA key fingerprint is c9:97:95:2a:5c:6a:2f:ac:e8:ac:94:24:b0:5c:45:8a.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.6.1' (RSA) to the list of known hosts.
neo@192.168.6.1's password: 

[root@centos6]~# sshpass -p 'chen' ssh neo@192.168.6.1
Last login: Wed Nov 13 15:24:50 2013
[neo@NEO ~]$ 





原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

目录
相关文章
|
1月前
|
Ubuntu Shell Linux
使用sshpass工具通过SSH执行远程命令
`sshpass`是一个用于在脚本中自动输入SSH密码的工具 **在Debian/Ubuntu上安装sshpass:** ```bash sudo apt-get install sshpass ``` **在CentOS/RHEL上安装sshpass:** ```bash sudo yum install sshpass ``` **在Fedora上安装sshpass:** ```bash sudo dnf install sshpass ``` 安装完成后,你可以使用`sshpass`命令通过SSH执行远程命令。以下是一个示例: ```bash sshpass -p 'yo
|
15天前
|
Linux 网络安全 数据安全/隐私保护
Jun 03 14:50:45 nodeName sshd[60215]: Accepted password for root from 192.168.0.100 port 15612 ssh2 如何关闭这个连接
【6月更文挑战第6天】Jun 03 14:50:45 nodeName sshd[60215]: Accepted password for root from 192.168.0.100 port 15612 ssh2 如何关闭这个连接
16 2
|
1月前
|
监控 安全 网络安全
Failed password for invalid user www from xx.xx.xx.xxx port xxxxx ssh2 问题处理
【5月更文挑战第6天】Failed password for invalid user www from xx.xx.xx.xxx port xxxxx ssh2 问题处理
112 1
|
jenkins Java 网络安全
ssh Permission denied (publickey,password).
        项目启动报错: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'videoService': FactoryBean threw .
9911 0
|
网络安全 数据安全/隐私保护
|
网络安全 数据安全/隐私保护 Linux