Skip to content

Instantly share code, notes, and snippets.

@jzztf
Last active August 18, 2018 09:59
Show Gist options
  • Save jzztf/b23f00d514d62aa46b809a20d8d0aa82 to your computer and use it in GitHub Desktop.
Save jzztf/b23f00d514d62aa46b809a20d8d0aa82 to your computer and use it in GitHub Desktop.
USE SCP WITH ALIAS

USE SCP WITH ALIAS

first step:

alias hostNameAlias='ssh hostName@xx.xx.xxx.xx'

second step:

vim ~/.ssh/config

Host hostNameAlias
HostName xx.xx.xxx.xx
User hostName
Port 22

third step:

# connect
ssh hostNameAlias
# scp
scp /some/file hostNameAlias:/path/to/storage/loaction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment