全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

IP归属甄别会员请立即修改密码
查看: 3016|回复: 20
打印 上一主题 下一主题

[Windows VPS] 在VPS上如何SSH到另外一台VPS,端口非22

[复制链接]
1#
发表于 2012-4-26 17:40:04 | 只看该作者
sunsea 发表于 2012-4-26 16:26
出问题了加权限提示
chmod: cannot access `777': No such file or directory
然后执行的时候提示

你也不给我加点分,不理你鸟
2#
发表于 2012-4-26 16:26:27 | 只看该作者
my6360 发表于 2012-4-26 14:30
ssh命令不能带密码的,但你可以expect自动输入密码

例如把下面代码保持成一个gotoshh.sh

出问题了加权限提示
chmod: cannot access `777': No such file or directory
然后执行的时候提示
autossh.sh: line 3: spawn: command not found
couldn't read file "password: ": no such file or directory
autossh.sh: line 5: send: command not found
couldn't read file "#": no such file or directory
autossh.sh: line 7: send: command not found
couldn't read file "eof": no such file or directory
但是我expect装了
[root@nhd2 ~]# whereis expect
expect: /usr/bin/expect /usr/lib/expect5.43 /usr/share/man/man1/expect.1.gz
求指导这是咋回事?
3#
发表于 2012-4-26 16:06:55 | 只看该作者
sunsea 发表于 2012-4-26 16:02
这个脚本可以加到rc.loacal里面做开机启动的吧?
占资源吗?

脚本只是完成一次登录
4#
发表于 2012-4-26 16:14:55 | 只看该作者
5#
发表于 2012-4-26 16:18:14 | 只看该作者
建议不要使用密码验证的方式登录ssh 。不然整天扫描。
6#
发表于 2012-4-26 16:02:31 | 只看该作者
loveminds 发表于 2012-4-26 15:34
pw后跟密码

这个脚本可以加到rc.loacal里面做开机启动的吧?
占资源吗?
7#
发表于 2012-4-26 15:34:45 | 只看该作者
sunsea 发表于 2012-4-26 15:01
set pw 替换成密码
这一句是后面跟密码还是pw换成密码

pw后跟密码
8#
发表于 2012-4-26 15:18:19 | 只看该作者
larry 发表于 2012-4-26 13:53
只有密钥认证才能不输密码

centos下怎么用密钥自动登陆?求方法
9#
发表于 2012-4-26 15:01:52 | 只看该作者
my6360 发表于 2012-4-26 14:30
ssh命令不能带密码的,但你可以expect自动输入密码

例如把下面代码保持成一个gotoshh.sh

set pw 替换成密码
这一句是后面跟密码还是pw换成密码
10#
发表于 2012-4-26 14:26:14 | 只看该作者
其实man一下不就有说明书了……
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-1-15 02:41 , Processed in 0.063901 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表