Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
17
Help us understand the problem. What is going on with this article?
@ironsand

ssh の設定ファイルを使って rsync で簡単にファイル転送

More than 5 years have passed since last update.

sshのログインを簡単に - Qiita [キータ]
http://qiita.com/ironsand/items/1910c49bc3ebef870a8d

で書いたように

~/.ssh/config
Host sakura
  HostName servername
  User username
  Port 10022

こんな感じに設定しておくと ssh sakura だけでサーバーに接続できるようになって便利なんですが、
rsyncを使うときには

rsync -e "ssh -p 10022"

のようにめんどくさい事を今までやってました。

解決策

rsync foo.txt sakura:/home/ironsand/

でOKだったそうです。簡単!

参考

How to use ~/.ssh/config setting for each server by rsync - Unix & Linux Stack Exchange
http://unix.stackexchange.com/questions/94421/how-to-use-ssh-config-setting-for-each-server-by-rsync

17
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ironsand
思いついたアイデアをすぐに形にできる能力を身につけたいのでRailsを頑張って習得中。仕事ください。

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
17
Help us understand the problem. What is going on with this article?