LoginSignup
3
3

More than 5 years have passed since last update.

sshとsftpとIPv6

Posted at

いつも混乱

組み込み開発でIPv6LLを使うことが多いが、忘れそうなのでメモ。
間違っていたらすいません。
確認環境: macOS 10.13.6, OpenSSH_7.8p1

ssh

いけるやつ

  • ssh -p 22 user@example.com
  • ssh -oPort=22 user@example.com
  • ssh ssh://user@example.com:22
  • ssh -p 22 user@2001:db8::1%eth0
  • ssh -oPort=22 -oUser=user 2001:db8::1%eth0

いけないやつ

  • ssh user@example.com:22
  • ssh -p 22 user@[2001:db8::1%eth0]
  • ssh ssh://user@[2001:db8::1%eth0]:22
  • ssh -p 22 ssh://user@2001:db8::1%eth0
  • ssh -oPort=22 -oUser=user [2001:db8::1%eth0]

sftp

いけるやつ

  • sftp -P 22 user@example.com
  • sftp sftp://user@example.com:22
  • sftp -P 22 user@[2001:db8::1%eth0]:.
  • sftp -P 22 -oUser=user [2001:db8::1%eth0]
  • sftp -oPort=22 -oUser=user [2001:db8::1%eth0]

いけないやつ

  • sftp user@example.com:22
  • sftp user@[2001:db8::1%eth0]:22
    • 22というディレクトリに移るという意味でならいける
  • sftp -P 22 user@2001:db8::1%eth0
  • sftp -P 22 user@[2001:db8::1%eth0]
  • sftp sftp://user@[2001:db8::1%eth0]:22

宿題

  • scp
  • パス指定の:
3
3
1

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
3
3