Create Shortcut for SSH Hosts
You frequently visit host 10.0.7.141 for example. It's a waste to type "ssh gcp@10.0.7.141" every time you connect it. So you can create a file ~/.ssh/config, and add follow lines to it:
Host 141
Hostname 10.0.7.141
User gcp
[Port 22]
[IdentityFile ~/.ssh/id_rsa.pub]
Now you can use "ssh 141" to connect to this host.
Or use "scp user@141:/home/user/" to copy files.
With key authorization (see note "Login SSH Server without Password"), you can connect to this host without inputing password. You can copy local file to remote host with "scp myfile 141:/target/path", and copy file on remote host to local folder with "scp 141:/source/path/to/file /target/folder".
Note: IdentifyFile is the shortcut of "-i /path/to/public-key" option of "ssh" command;
Create Shortcut for SSH Hosts的更多相关文章
- Create Shortcut to Get Jar File Meta Information
You have to get meta information of cobertura.jar with command "unzip -q -c cobertura.jar META- ...
- [转载] 构造linux 系统下免密码ssh登陆 _How to establish password-less login with SSH
In present (post production) IT infrastructure many different workstations, servers etc. have to be ...
- Passwordless SSH Login
原文地址:http://manjeetdahiya.com/2011/03/03/passwordless-ssh-login/ Consider two machines A and B. We w ...
- linux服务之ssh
架构:c/s 开发语言:c语言 服务器端:在linux平台下部署 客户端:一般是cli界面下的ssh命令 官网:http://www.openssh.com/portable.html 25个必须记住 ...
- man ssh翻译(ssh命令中文手册)
本文为命令ssh的man文档翻译,翻译了90%的内容,剩余是一些没必要翻译的东西,请见谅. 如此文有所疑惑,希望我的另一篇文章能解惑: SSH(1) BSD Ge ...
- 【转载】SSH login without password 免密登陆
Your aim You want to use Linux and OpenSSH to automate your tasks. Therefore you need an automatic l ...
- SSH login without password
SSH login without password Your aim You want to use Linux and OpenSSH to automize your tasks. Theref ...
- Linux记录-Shell自动化部署批量建立用户和批量SSH配置(转载)
if [ ! $# -eq 2 ] ; then echo "请输入用户名和密码以空格分开!" exit else name="$1" passwd=" ...
- DWR以及SSH集成DWR
之前只是单独接触了DWR,知道一个基本的开发流程. web.xml配置文件: <!-- 配置Dwr信息 --> <servlet> <servlet-name> ...
随机推荐
- 第二章 - Java与协程
Java与协程 内核线程的局限 通过一个具体场景来解释目前Java线程面临的困境.今天对Web应用的服务要求,不论是在请求数量上还是在复杂度上,与十多年前相比已不可同日而语,这一方面是源于业务量的增长 ...
- ROS2学习之旅(12)——创建工作空间
workspace(工作空间)是包含ROS2 packages(包)的文件夹.在使用ROS 2之前,有必要在终端中source一下ROS 2的安装工作区,这样就可以在该终端中使用ROS 2的软件包. ...
- postgresql分组后获取第一条数据
-- 根据编号分组取第一条数据 select * from table t where t.no=(select max(no) from table t1 where t1.no=t.no) -- ...
- 以太网MAC地址组成与交换机基本知识
以太网MAC地址 MAC地址由48位二进制组成,通常分为六段,用十六进制表示,工作在数据链路层. 数据链路层功能: 链路的建立,维护与拆除 帧包装,帧传输,帧同步 帧的差错恢复 简单的流量控制 第八位 ...
- 基于腾讯云Serverless的HTTP服务探活函数
本文基于 Golang 开发了一款简单易用的拨测云函数,入口函数与腾讯云 Serverless SDK 绑定.与目前腾讯云中默认的拨测函数不同的是, url-tester-func 支持非 200 响 ...
- C语言:最大公约数
//求最大公约数 #include <stdio.h> main() { int m,n,i,k; scanf("%d,%d",&m,&n); k=m& ...
- Odoo ORM研究1 - BaseModel中的类属性的作用
概述 我们在写odoo项目的时候,经常继承model.Model来创建我们自己的ORM映射关系表. AbstractModel = BaseModel # 源码 class Model(Abstrac ...
- 写了这么多年 CSS,initial 和 inherit 以及 unset 和 revert 还傻傻分不清楚?
经常会碰到,问一个 CSS 属性,例如 position 有多少取值. 通常的回答是 static.relative.absolute 和 fixed .当然,还有一个稍微生僻的 sticky .其实 ...
- .NET Core 中的 Swagger 应用与微服务场景下的Swagger Api 集成显示
Swagger 与 OpenAPI 的历史来源: Swagger 项目于 2015 年捐赠给 OpenAPI Initiative,此后被称为 OpenAPI.这两个名称可以互换使用.但是," ...
- Requests方法 -- Blog流程类进行关联
1.接口封装关联 1.有些接口经常会用到比如登录的接口,这时候我们可以每个接口都封装成一个方法,如:登录.保存草稿.发帖.删帖,这四个接口就可以写成四个方法2.接口封装好了后,后面我们写用例那就直接调 ...