Linux 関係覚え書き

curl で SCP

ファイル取得

$ curl -k -o hoge.txt -u username scp://exapmle.com:22/tmp/data.txt

ファイルアップロード

$ curl -k --upload-file hoge.txt -u username scp://example.com:22/tmp/

認証が必要なページにアクセス

SSL クライアント認証

$ curl -k --cert 証明書ファイル --key 鍵ファイル --basic -u  ユーザ名:パスワード URL

BASIC 認証

$ curl  --basic -u  ユーザ名:パスワード URL

DIGEST 認証

$ curl --digest -u  ユーザ名:パスワード URL

POST

$ curl --data "key=WORD&comment=search&c=search" http://example.com/hiki.cgi

メール送信

$ curl --mail-from username@example.com --mail-rcpt username2@example.jp --upload-file msg.txt smtp://example.com:25

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2017-01-03 (火) 12:14:19