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. web自动化页面元素不能键盘输入

    一.背景 web自动化中存在一部分元素属性是readonly属性,导致我们在使用自动化代码的时候无法使用sendkeys()方法传入数据,以12306网站选择出发日期为例,见下图 二.json语句处理 ...

  2. Docker:虚拟机挂起后,再启动docker容器连接失败

    问题描述 当我们使用VMware15 Pro 创建虚拟机并运行Linux搭建的Docker时,挂起虚拟机后再次运行发现访问Docker容器失败. 解决方式  我们正常的挂起其实是:挂起客户机,博主尝试 ...

  3. Python 脚本退出

    return:在定义函数时从函数中返回一个函数的返回值,终止函数的执行. os._exit(),sys.exit(),exit(),quit()都能够退出当前执行脚本,差别在于os._exit()直接 ...

  4. MySQL 删除devices表中id最大的一行

    原想法:delete from devices where id in (select max(id) from devices); 报错:ERROR 1093 (HY000): You can't ...

  5. ESP32智能配网笔记

    基于ESP-IDF4.1 #include <string.h> #include <stdlib.h> #include "freertos/FreeRTOS.h& ...

  6. SEO优化:如何挖掘关键词谷歌篇

    最近SEO禅在做安卓项目比较忙,大部分入门理论的文章也写了差不多了,有的也写了一个系列,但是感觉还是不够完善,有很多边边角角的地方感觉也没说清楚,所以还是有必要写一些零散文章去补充说明下,就比如关于S ...

  7. JAVA 中日志的记录于使用

    java中常用的日志框架 日志接口 Commons Logging Apache Commons Logging是一个基于Java的日志记录实用程序,是用于日志记录和其他工具包的编程模型.它通过其他一 ...

  8. 【有奖互动】HMS Core. Sparkle游戏应用创新沙龙,诚邀您参与

    活动简介 随着互联网基础设施的完善和"宅经济"效应凸显,游戏行业逆势上扬,迎来巨大消费市场.同时,用户需求愈加多样化,如何进一步创新和技术升级.提升核心竞争力已成为游戏开发与运营的 ...

  9. SpringMvc接受请求参数的几种情况演示

    说明: 通常get请求获取的参数是在url后面,而post请求获取的是请求体当中的参数.因此两者在请求方式上会有所不同. 1.直接将接受的参数写在controller对应方法的形参当中(适用于get提 ...

  10. Python开发篇——构建虚拟Python开发环境(Conda+Poetry)

    前言 之前虽略有提及Python,但是没有实际地写点料.惭愧,惭愧,所以这次先起个头,讲讲如何构建虚拟Python开发环境.相信之前看过我博客的人可能会想:博主不会又要聊聊Docker吧?放心,不会. ...