11
10

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 ssh で RLogin を起動する

11
Posted at

下記の記事の RLogin バージョン。

.vagrant.d/Vagrantfile

  • msysgit でパスの通ったとろこに既に ssh があるので先頭に追加
ENV['PATH'] = File.expand_path(File.dirname(__FILE__)) + ";" + ENV['PATH']

.vagrant.d/ssh.bat

  • なぜか vagrant ssh で、1回目は引数なしで呼ばれた後に、2回目に引数つきで呼ばれるような動作をした
    • 引数の有無を確認して空なら何もしないようにする
  • 公開鍵認証でも適当なパスワードを指定しておかないと RLogin のダイアログが表示される
    • 適当なパスワード(dummy)を指定する
  • あらかじめ vagrant という名前で RLogin のエントリを作成しておかなければならない
    • 秘密鍵はそこで指定しておく
@rem %*
@echo off
setlocal

set RLOGIN_BIN=D:\app\RLogin\RLogin
set RLOGIN_ENTRY=vagrant

if "%*"=="" goto end

set p1=%1
set user=%p1:@= & set host=%
:loop
  if "%~1"=="-p" set port=%2
  if "%~1"=="-i" set keyfile=%2
  shift
if not "%~1"=="" goto loop

start "" %RLOGIN_BIN% /entry %RLOGIN_ENTRY% /ip %host% /port %port% /user %user% /pass dummy /inuse

:end
11
10
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
11
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?