LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1544|回复: 4

如何正确使用ssh指令

[复制链接]
发表于 2006-4-19 23:49:42 | 显示全部楼层 |阅读模式
求教:

如何使用ssh指令, 我想用ssh指令登陆其他联网机器,但是每台机器要有密码确认。
请问如何写这个指令,一句就可以完成?

jyu@europe20:/home/uei/jyu>ssh europe15
jyu@europe15's password:

上面这样是要两步才能登陆。

能不能用个什么ssh的option直接搞定呢?
多谢多谢。。。
发表于 2006-4-20 10:59:52 | 显示全部楼层
1. on your ssh client, generate id_dsa.pub (man ssh-keygen)
2. copy the contents of id_dsa.pub to your ssh server login user .ssh/authorized_keys file. If not existing, create one.
After this, you don't need to provide password anymore.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-4-20 19:48:53 | 显示全部楼层
斑竹,能否解释更加详细一点啊?搞不定啊?见笑见笑。。。
回复 支持 反对

使用道具 举报

发表于 2006-4-20 21:20:14 | 显示全部楼层
1. under your home .ssh dir, you can run ssh-keygen -t dsa to generate a pair of ssh key. One is the public key which you can distribute out. (The other is your secret key you need to keep it).
2. copy the contents of the pub key to the server you want to logon. Under the login user home dir, there is also a .ssh dir. you can create a file named authorized_keys and paste the contents of your pub key to this file.
3. Once you get all this done, you should just login without password.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-4-21 17:29:39 | 显示全部楼层
多谢版主,已经成功搞定。。。

但是还有一个问题,我输入了指令:Use_modelsim vcom *.vhd,
本来我是想开启modelsim,然后运行vcom的,可是这样之后就出问题了,
提示是:
waiting for lock jyu@europe17.ieee.com Lockfile is work/_lock
waiting for lock jyu@europe17.ieee.com Lockfile is work/_lock
waiting for lock jyu@europe17.ieee.com Lockfile is work/_lock
一直就是这样了,如何恢复原来啊?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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