标签:
usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] [-D [bind_address:]port] [-e escape_char] [-F configfile] [-I pkcs11] [-i identity_file] [-L [bind_address:]port:host:hostport] [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] [-R [bind_address:]port:host:hostport] [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]] [user@]hostname [command]
主要参数说明: -l 指定登入用户 -p 设置端口号 -f 后台运行,并推荐加上 -n 参数 -n 将标准输入重定向到 /dev/null,防止读取标准输入 -N 不执行远程命令,只做端口转发 -q 安静模式,忽略一切对话和错误提示 -T 禁用伪终端配置
执行命令效果如下:
[oracle@Oracle11_2 scripts]$ ssh -l oracle Oracle11 "ls /" backup bin boot data dev etc home lib lib64 lost+found media mnt opt proc root sbin selinux srv sys tmp usr var
参考:http://blog.csdn.net/fdipzone/article/details/23000201
标签:
原文地址:http://www.cnblogs.com/storymedia/p/4547359.html