1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Linux メモ sftpコマンドでアップロード・ダウンロード

Posted at

Linux に関するメモ。
ファイル転送についてscpでも同様のことができるが、こちらは脆弱性があるとのことで非推奨となっているので、sftpを使った。

windows10 Powershell にて動作確認。

ログイン

PS C:\WINDOWS\system32> sftp -i C:\Users\username\Downloads\sample.pem ec2-user@123.456.789.0

ローカルへダウンロード

sftp> get test.txt C:\Users\username\Downloads
Fetching /home/ec2-user/test.txt to C:/Users/username/Downloads/test.txt
/home/ec2-user/test.txt                                                  38%   62MB 367.0KB/s   04:40 ETA

ローカルからアップロード

sftp> put C:\Users\username\Downloads\test.txt /home/ec2-user/dir/
Uploading C:/Users/username/Downloads/test.txt to /home/ec2-user/dir/test.txt
C:/Users/username/Downloads/test.txt                                             100% 1350    26.1KB/s   00:00

参考記事

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?