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的更多相关文章

  1. 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- ...

  2. [转载] 构造linux 系统下免密码ssh登陆  _How to establish password-less login with SSH

    In present (post production) IT infrastructure many different workstations, servers etc. have to be ...

  3. Passwordless SSH Login

    原文地址:http://manjeetdahiya.com/2011/03/03/passwordless-ssh-login/ Consider two machines A and B. We w ...

  4. linux服务之ssh

    架构:c/s 开发语言:c语言 服务器端:在linux平台下部署 客户端:一般是cli界面下的ssh命令 官网:http://www.openssh.com/portable.html 25个必须记住 ...

  5. man ssh翻译(ssh命令中文手册)

    本文为命令ssh的man文档翻译,翻译了90%的内容,剩余是一些没必要翻译的东西,请见谅. 如此文有所疑惑,希望我的另一篇文章能解惑: SSH(1)                    BSD Ge ...

  6. 【转载】SSH login without password 免密登陆

    Your aim You want to use Linux and OpenSSH to automate your tasks. Therefore you need an automatic l ...

  7. SSH login without password

    SSH login without password Your aim You want to use Linux and OpenSSH to automize your tasks. Theref ...

  8. Linux记录-Shell自动化部署批量建立用户和批量SSH配置(转载)

    if [ ! $# -eq 2 ] ; then echo "请输入用户名和密码以空格分开!" exit else name="$1" passwd=" ...

  9. DWR以及SSH集成DWR

    之前只是单独接触了DWR,知道一个基本的开发流程. web.xml配置文件: <!-- 配置Dwr信息 -->  <servlet>   <servlet-name> ...

随机推荐

  1. Mysql Limit 调优

    建表与插入数据 SQL对比 基本数据 创建表 CREATE TABLE student ( id int(10) NOT NULL AUTO_INCREMENT, name varchar(25) D ...

  2. 两台主机间docker容器网络互通

    服务器1: 网络172.30.0.0/16 服务器2: 网络172.31.0.0/16 服务器1和服务器2上的docker容器网络之间是无法互通的,如果需要互通,需要做以下配置: 服务器1上执行: i ...

  3. Linux环境Nginx安装、调试以及PHP安装(转)

      linux版本:64位CentOS 6.4 Nginx版本:nginx1.8.0 php版本:php5.5 1.编译安装Nginx 官网:http://wiki.nginx.org/Install ...

  4. 2013年第四届蓝桥杯C/C++程序设计本科B组省赛 马虎的算式

    题目描述 马虎的算式 小明是个急性子,上小学的时候经常把老师写在黑板上的题目抄错了. 有一次,老师出的题目是:36 x 495 = ? 他却给抄成了:396 x 45 = ? 但结果却很戏剧性,他的答 ...

  5. B 站崩了,受害程序员聊聊

    非吃瓜,B 站事件始末分析 + 防治技术分享 大家好,我是鱼皮,昨天小破站崩了的事情相信很多朋友都听说了. 这要是搁以前,不爱吃瓜的我根本不会去关注这种事,崩了就崩了呗,反正天塌下来有程序员大佬们扛着 ...

  6. 一行代码打印python之禅

    就这一句: import this 输出: The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is be ...

  7. ORM研究3 - odoo fields常用的字段属性

    之前我们已经讲解了odoo ORM中的一些对字段常用的API操作方法,今天我们继续研究一下Odoo orm中字段的一些通用属性字段的使用,学会它们可以为自己创建数据映射并使用有更好的帮助. 通用字段属 ...

  8. ES6 数组Arrary 常用方法

    ES6 数组Arrary 常用方法: <script type="text/javascript"> // 操作数据方法 // arr.push() 从后面添加元素,返 ...

  9. Junit测试用例配置Log4j

    用Junit测试非常方便,但有时我们想要看日志来方便排除,使用spring+log4j时,用Junit测试看日志很多人都不太会,即如何将Junit与log4j进行整合. 我也是研究了半天,才终于找到了 ...

  10. Laravel 6 – 搭建管理后台的用户认证“脚手架”工具

    1. 下载Laravel/ui 命令: composer require laravel/ui "^1.0" -dev 注意laravel framework 6只支持版本1的la ...