0
2

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 5 years have passed since last update.

Vagrant での sftp 接続

Posted at

Vagrant で sftp 接続するには

前の記事でVagrantについてあれこれと書きましたが、久しぶりに新規でゲストOSを設定しようとしたところ
sftp接続ではまってしまったので備忘のためにこれを書きます。

sftp がつながらない・・・

CentOS をインストールしたが sftp がつながらない。
SSH 接続は出来るけれど sftp がつながらない。

グーグル先生に聞いて /etc/ssh/sshd_config の設定を変えたりしてみたけど sftp がつながらない。

もういっか、あきらめよう、と思ってたところに ポートは空いてますか という某質問サイトに書き込みが・・・・

sftp というものを正しく理解していなかった

Wikipedia より

SSH File Transfer Protocol

SSH File Transfer Protocol(SFTP)は、信頼性の高いデータストリーム(英語版)上でのファイル転送やファイル管理を提供する通信プロトコルである。Internet Engineering Task Force(IETF)によって ~~~ snip ~~~ SSHなどのセキュアな通信路で実行されること

あれ??SSHは繋がってるのにな・・・

結論

Vagrant のデフォルトのSSH用ポートは 2222 です!
$ vagrant ssh-config

Host default
HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
~~ snip ~~

sftp 用ソフトの設定でポートを 2222 に設定したらサクッと繋がりましたとさ_(┐「ε:)_

0
2
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
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?