reasonzhang的个人博客分享 http://blog.sciencenet.cn/u/reasonzhang

博文

Set up your Mac/Linux and avoid double logging in (ssh->ssh)

已有 2221 次阅读 2015-2-24 05:23 |系统分类:科研笔记

If only you need to login into A.edu and then login to B.edu.


A quick guide on how to get rid of vorlon, an example:

1. First:
   mkdir ~/.ssh
   vim ~/.ssh/config
         Contents of config:
                Host yws14
                         User your_user_name
                         HostName B.edu
                         ProxyCommand /usr/bin/ssh your_user_name@A.edu /usr/bin/nc %h %p
                       
 
 After these, you may try 'ssh B', and input the passwd of your A and B. Also, you may try file transfer 'scp B:~/.bashrc ./'.


2. If you want to skip the password stuff:
   ssh-keygen -t rsa           (Just yes, enter, enter to create a simple keygen, or leave it blank)

   cat ~/.ssh/id_rsa.pub | ssh your_user_name@A.edu 'cat >> .ssh/authorized_keys’
   ssh your_user_name@A.edu
   ssh-keygen -t rsa (create a new private-public key pair in A)
   cat .ssh/id_rsa.pub | ssh your_user_name@B.edu 'cat >> .ssh/authorized_keys’


Then, everything is set.

The essence is to use private-public key pairs to avoid password stuff.




https://blog.sciencenet.cn/blog-733034-869783.html

上一篇:IDL中使用对象出图法和过程出图的交互
下一篇:Transfer data using GLOBUS
收藏 IP: 128.61.55.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-30 21:42

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部