Linux远程连接快捷方式
浏览:2296次 出处信息
今天在闲逛www.cpan.org时,发现了一个懒人运维之宝的脚本-Linux远程连接快捷方式(remote-ssh-access)。且听我慢慢道来:
1.官方描述:remote-ssh-access - An application for creating handy SSH client shortcut.
2.懒人解释:大家都用过windows下面的远程桌面连接吧。在有多台windows机器时,我常常会利用远程桌面连接的选项设置直接保存为快捷方式。下次连接时,我们就不需要在输入用户名和密码直接双击刚刚保存的快捷方式。remote-ssh-access在Linux下面创建远程登录的软连接,下次登录时只需要执行刚刚新建的软软件就可以自动登录到远程Linux主机。
3.下载:http://cpan.hexten.net/authors/id/L/LD/LDAVIS/remote-ssh-access-1.5
4.用法举例:
- 生成ssh密钥文件:
$ssh-keygen
- 传输密钥到目标主机(要自动登录的主机)
$ssh-copy-id -i ~/.ssh/id_rsa.pub root@{you host}
- 创建快捷方式
[root@192.168.1.1 .hosts]# ./remote-ssh-access --add *** Entering input loop: your valid non-data input commands are: `back', `exit' or `quit' Hostname --> 192.168.1.2 Username [EMPTY=All users] --> root Port [EMPTY=22] --> 22 Public Key [EMPTY=Default key] --> id_rsa Version --> 2 Command [EMPTY=Login shell] --> id Shortcut --> ***: field 'short' is required Shortcut --> hello_root The shortcut '121_root' has been created. [root@192.168.1.1 .hosts]# ls 192.168.1.2:root:22:id_rsa:2:id hello_root remote-ssh-access
- 快捷方式登录
$hello_root /usr/bin/ssh -2 -p 22-i /root/.ssh/id_rsa -l root 192.168.1.2 Last login: Tue Mar 23 16:12:48 2010 from 192.168.1.1
- 为了更快捷
export PATH=$PATH:/root/.host/
建议继续学习:
QQ技术交流群:445447336,欢迎加入!
扫一扫订阅我的微信号:IT技术博客大学习
扫一扫订阅我的微信号:IT技术博客大学习
<< 前一篇:如何查看Linux 硬件配置信息
后一篇:Linux 硬件信息查看 dmidecode >>
文章信息
- 作者:懒人运维 来源: 懒人运维
- 标签: 远程连接
- 发布时间:2010-03-24 23:35:38
建议继续学习
近3天十大热文
-
[83] memory prefetch浅析
-
[53] 转载:cassandra读写性能原理分析
-
[51] 深入浅出cassandra 4 数据一致性问
-
[51] 基本排序算法的PHP实现
-
[46] 字符引用和空白字符
-
[41] Inline Form Labels
-
[41] MySQL半同步存在的问题
-
[40] JS中如何判断字符串类型的数字
-
[40] 获取Dom元素的X/Y坐标
-
[40] javascript插入样式