Skip to content

Instantly share code, notes, and snippets.

@nazoking
Created April 10, 2013 07:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nazoking/5352687 to your computer and use it in GitHub Desktop.
Save nazoking/5352687 to your computer and use it in GitHub Desktop.
sshコマンドが呼ばれたらputtyを起動するバッチ http://d.hatena.ne.jp/nazoking/20130410/1365580827
@ruby -e "A=ARGV;i=0;b=[];while(a=A[i]); case a; when '-p' then b += ['-P',A[i+1]]; i+=1; when '-o' then i+=1; when '-i' then b += [a,A[i+1]+'.ppk']; i+=1; else b << a; end; i+=1; end;puts b.join(' ');system('putty', *b)" %*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment