js-keygen/index.html

46 lines
2 KiB
HTML
Raw Normal View History

2015-09-03 11:58:00 +00:00
<!doctype html>
<html>
<head>
<title>Key Pair generation for SSH access</title>
<script src="base64url.js"></script>
<script src="ssh-util.js"></script>
2015-09-03 12:54:43 +00:00
<script src="keypair.js"></script>
<link rel="stylesheet" href="js-keygen.css">
2015-09-03 11:58:00 +00:00
</head>
<body>
2015-09-03 12:54:43 +00:00
For an explanation on how this work, see the <a href="http://blog.roumanoff.com/">blog post</a>.<br>
Usually you would want to save the private key to the machine initiating the ssh connection, and you want to copy the public key to the system receiving the connection.<br>
No data is being sent to the server, everything happens within the context of this web page.
<hr>
<div><label for="name">Name:</label><input id="name" type="text" value="webcrypto"></div>
<div><label for="alg">Algorithm:</label><select id="alg" disabled>
<option value="RSASSA-PKCS1-v1_5" selected>RSASSA-PKCS1-v1_5</option>
<option value="RSA-PSS">RSA-PSS</option>
<option value="ECDSA">ECDSA</option>
</select>
<label for="size">Size:</label><select id="size" disabled>
<option value="1024" selected>1024</option>
<option value="2048">2048</option>
<option value="4096">4096</option>
</select>
</div>
<div><label for="hash">Hash:</label><select id="hash" disabled>
<option value="SHA-1" selected>SHA-1</option>
2015-09-03 11:58:00 +00:00
<option value="SHA-256">SHA-256</option>
<option value="SHA-384">SHA-384</option>
<option value="SHA-512">SHA-512</option>
</select></div>
2015-09-03 12:54:43 +00:00
<label for="generate"></label><button id="generate">Generate</button>
2015-09-03 11:58:00 +00:00
<br>
2015-09-03 12:54:43 +00:00
<hr>
<a id="private" style="display: none;" href="" download="id_rsa">id_rsa</a>
<a id="public" style="display: none;" href="" download="id_rsa.pub">id_rsa.pub</a>
Private Key <button id="copyPrivate">Copy</button> or <button id="savePrivate">Save</button><br>
<textarea id="privateKey" style="height: 150px;" spellcheck="false"></textarea>
2015-09-03 11:58:00 +00:00
2015-09-03 12:54:43 +00:00
<hr>
Public Key <button id="copyPublic">Copy</button> or <button id="savePublic">Save</button><br>
<textarea id="publicKey" spellcheck="false"></textarea>
2015-09-03 11:58:00 +00:00
</body>
</html>