mirror of
https://github.com/moul/sshportal.git
synced 2025-01-11 18:08:42 +08:00
commit
395827afeb
6 changed files with 372 additions and 20 deletions
30
.assets/cluster-mysql.dot
Normal file
30
.assets/cluster-mysql.dot
Normal file
|
@ -0,0 +1,30 @@
|
|||
graph {
|
||||
rankdir=LR;
|
||||
subgraph cluster_sshportal {
|
||||
label="sshportal cluster";
|
||||
edge[style=dashed,color=grey,constraint=false];
|
||||
sshportal1; sshportal2; sshportal3; sshportalN;
|
||||
sshportal1 -- MySQL;
|
||||
sshportal2 -- MySQL;
|
||||
sshportal3 -- MySQL;
|
||||
sshportalN -- MySQL;
|
||||
}
|
||||
|
||||
subgraph cluster_hosts {
|
||||
label="hosts";
|
||||
host1; host2; host3; hostN;
|
||||
}
|
||||
|
||||
subgraph cluster_users {
|
||||
label="users";
|
||||
user1; user2; user3; userN;
|
||||
}
|
||||
|
||||
{
|
||||
user1 -- sshportal1 -- host1[color=red,penwidth=3.0];
|
||||
user2 -- sshportal2 -- host2[color=green,penwidth=3.0];
|
||||
user3 -- sshportal3 -- host3[color=blue,penwidth=3.0];
|
||||
user3 -- sshportal2 -- host1[color=purple,penwidth=3.0];
|
||||
userN -- sshportalN -- hostN[style=dotted];
|
||||
}
|
||||
}
|
176
.assets/cluster-mysql.svg
Normal file
176
.assets/cluster-mysql.svg
Normal file
|
@ -0,0 +1,176 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.40.1 (20161225.0304)
|
||||
-->
|
||||
<!-- Title: %3 Pages: 1 -->
|
||||
<svg width="334pt" height="314pt"
|
||||
viewBox="0.00 0.00 333.78 314.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 310)">
|
||||
<title>%3</title>
|
||||
<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-310 329.7751,-310 329.7751,4 -4,4"/>
|
||||
<g id="clust1" class="cluster">
|
||||
<title>cluster_sshportal</title>
|
||||
<polygon fill="none" stroke="#000000" points="106.4533,-8 106.4533,-298 219.3045,-298 219.3045,-8 106.4533,-8"/>
|
||||
<text text-anchor="middle" x="162.8789" y="-282.8" font-family="Times,serif" font-size="14.00" fill="#000000">sshportal cluster</text>
|
||||
</g>
|
||||
<g id="clust2" class="cluster">
|
||||
<title>cluster_hosts</title>
|
||||
<polygon fill="none" stroke="#000000" points="239.3045,-62 239.3045,-298 317.7751,-298 317.7751,-62 239.3045,-62"/>
|
||||
<text text-anchor="middle" x="278.5398" y="-282.8" font-family="Times,serif" font-size="14.00" fill="#000000">hosts</text>
|
||||
</g>
|
||||
<g id="clust3" class="cluster">
|
||||
<title>cluster_users</title>
|
||||
<polygon fill="none" stroke="#000000" points="8,-62 8,-298 86.4533,-298 86.4533,-62 8,-62"/>
|
||||
<text text-anchor="middle" x="47.2266" y="-282.8" font-family="Times,serif" font-size="14.00" fill="#000000">users</text>
|
||||
</g>
|
||||
<!-- sshportal1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>sshportal1</title>
|
||||
<ellipse fill="none" stroke="#000000" cx="162.8789" cy="-250" rx="46.4218" ry="18"/>
|
||||
<text text-anchor="middle" x="162.8789" y="-245.8" font-family="Times,serif" font-size="14.00" fill="#000000">sshportal1</text>
|
||||
</g>
|
||||
<!-- MySQL -->
|
||||
<g id="node5" class="node">
|
||||
<title>MySQL</title>
|
||||
<ellipse fill="none" stroke="#000000" cx="162.8789" cy="-34" rx="39.1973" ry="18"/>
|
||||
<text text-anchor="middle" x="162.8789" y="-29.8" font-family="Times,serif" font-size="14.00" fill="#000000">MySQL</text>
|
||||
</g>
|
||||
<!-- sshportal1--MySQL -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>sshportal1--MySQL</title>
|
||||
<path fill="none" stroke="#c0c0c0" stroke-dasharray="5,2" d="M124.8869,-239.5365C113.0929,-234.0967 101.7898,-225.9823 96.4533,-214 83.4344,-184.768 83.4344,-99.232 96.4533,-70 102.3234,-56.8194 115.4132,-48.3192 128.4343,-42.9106"/>
|
||||
</g>
|
||||
<!-- host1 -->
|
||||
<g id="node6" class="node">
|
||||
<title>host1</title>
|
||||
<ellipse fill="none" stroke="#000000" cx="278.5398" cy="-250" rx="29.0429" ry="18"/>
|
||||
<text text-anchor="middle" x="278.5398" y="-245.8" font-family="Times,serif" font-size="14.00" fill="#000000">host1</text>
|
||||
</g>
|
||||
<!-- sshportal1--host1 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>sshportal1--host1</title>
|
||||
<path fill="none" stroke="#ff0000" stroke-width="3" d="M209.5892,-250C222.8807,-250 236.9866,-250 248.9537,-250"/>
|
||||
</g>
|
||||
<!-- sshportal2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>sshportal2</title>
|
||||
<ellipse fill="none" stroke="#000000" cx="162.8789" cy="-196" rx="46.4218" ry="18"/>
|
||||
<text text-anchor="middle" x="162.8789" y="-191.8" font-family="Times,serif" font-size="14.00" fill="#000000">sshportal2</text>
|
||||
</g>
|
||||
<!-- sshportal2--MySQL -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>sshportal2--MySQL</title>
|
||||
<path fill="none" stroke="#c0c0c0" stroke-dasharray="5,2" d="M124.8869,-185.5365C113.0929,-180.0967 101.7898,-171.9823 96.4533,-160 88.3165,-141.73 88.3165,-88.27 96.4533,-70 102.3234,-56.8194 115.4132,-48.3192 128.4343,-42.9106"/>
|
||||
</g>
|
||||
<!-- sshportal2--host1 -->
|
||||
<g id="edge12" class="edge">
|
||||
<title>sshportal2--host1</title>
|
||||
<path fill="none" stroke="#a020f0" stroke-width="3" d="M192.6645,-209.9063C212.0749,-218.9687 237.0472,-230.6278 255.0535,-239.0347"/>
|
||||
</g>
|
||||
<!-- host2 -->
|
||||
<g id="node7" class="node">
|
||||
<title>host2</title>
|
||||
<ellipse fill="none" stroke="#000000" cx="278.5398" cy="-196" rx="29.0429" ry="18"/>
|
||||
<text text-anchor="middle" x="278.5398" y="-191.8" font-family="Times,serif" font-size="14.00" fill="#000000">host2</text>
|
||||
</g>
|
||||
<!-- sshportal2--host2 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>sshportal2--host2</title>
|
||||
<path fill="none" stroke="#00ff00" stroke-width="3" d="M209.5892,-196C222.8807,-196 236.9866,-196 248.9537,-196"/>
|
||||
</g>
|
||||
<!-- sshportal3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>sshportal3</title>
|
||||
<ellipse fill="none" stroke="#000000" cx="162.8789" cy="-142" rx="46.4218" ry="18"/>
|
||||
<text text-anchor="middle" x="162.8789" y="-137.8" font-family="Times,serif" font-size="14.00" fill="#000000">sshportal3</text>
|
||||
</g>
|
||||
<!-- sshportal3--MySQL -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>sshportal3--MySQL</title>
|
||||
<path fill="none" stroke="#c0c0c0" stroke-dasharray="5,2" d="M124.8869,-131.5365C113.0929,-126.0967 101.7898,-117.9823 96.4533,-106 89.9439,-91.384 89.9439,-84.616 96.4533,-70 102.3234,-56.8194 115.4132,-48.3192 128.4343,-42.9106"/>
|
||||
</g>
|
||||
<!-- host3 -->
|
||||
<g id="node8" class="node">
|
||||
<title>host3</title>
|
||||
<ellipse fill="none" stroke="#000000" cx="278.5398" cy="-142" rx="29.0429" ry="18"/>
|
||||
<text text-anchor="middle" x="278.5398" y="-137.8" font-family="Times,serif" font-size="14.00" fill="#000000">host3</text>
|
||||
</g>
|
||||
<!-- sshportal3--host3 -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>sshportal3--host3</title>
|
||||
<path fill="none" stroke="#0000ff" stroke-width="3" d="M209.5892,-142C222.8807,-142 236.9866,-142 248.9537,-142"/>
|
||||
</g>
|
||||
<!-- sshportalN -->
|
||||
<g id="node4" class="node">
|
||||
<title>sshportalN</title>
|
||||
<ellipse fill="none" stroke="#000000" cx="162.8789" cy="-88" rx="48.3514" ry="18"/>
|
||||
<text text-anchor="middle" x="162.8789" y="-83.8" font-family="Times,serif" font-size="14.00" fill="#000000">sshportalN</text>
|
||||
</g>
|
||||
<!-- sshportalN--MySQL -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>sshportalN--MySQL</title>
|
||||
<path fill="none" stroke="#c0c0c0" stroke-dasharray="5,2" d="M162.8789,-69.7902C162.8789,-63.907 162.8789,-58.0238 162.8789,-52.1406"/>
|
||||
</g>
|
||||
<!-- hostN -->
|
||||
<g id="node9" class="node">
|
||||
<title>hostN</title>
|
||||
<ellipse fill="none" stroke="#000000" cx="278.5398" cy="-88" rx="31.4723" ry="18"/>
|
||||
<text text-anchor="middle" x="278.5398" y="-83.8" font-family="Times,serif" font-size="14.00" fill="#000000">hostN</text>
|
||||
</g>
|
||||
<!-- sshportalN--hostN -->
|
||||
<g id="edge14" class="edge">
|
||||
<title>sshportalN--hostN</title>
|
||||
<path fill="none" stroke="#000000" stroke-dasharray="1,5" d="M211.5943,-88C223.5713,-88 236.0833,-88 247.0054,-88"/>
|
||||
</g>
|
||||
<!-- user1 -->
|
||||
<g id="node10" class="node">
|
||||
<title>user1</title>
|
||||
<ellipse fill="none" stroke="#000000" cx="47.2266" cy="-250" rx="29.0257" ry="18"/>
|
||||
<text text-anchor="middle" x="47.2266" y="-245.8" font-family="Times,serif" font-size="14.00" fill="#000000">user1</text>
|
||||
</g>
|
||||
<!-- user1--sshportal1 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>user1--sshportal1</title>
|
||||
<path fill="none" stroke="#ff0000" stroke-width="3" d="M76.7098,-250C88.7561,-250 102.9825,-250 116.3672,-250"/>
|
||||
</g>
|
||||
<!-- user2 -->
|
||||
<g id="node11" class="node">
|
||||
<title>user2</title>
|
||||
<ellipse fill="none" stroke="#000000" cx="47.2266" cy="-196" rx="29.0257" ry="18"/>
|
||||
<text text-anchor="middle" x="47.2266" y="-191.8" font-family="Times,serif" font-size="14.00" fill="#000000">user2</text>
|
||||
</g>
|
||||
<!-- user2--sshportal2 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>user2--sshportal2</title>
|
||||
<path fill="none" stroke="#00ff00" stroke-width="3" d="M76.7098,-196C88.7561,-196 102.9825,-196 116.3672,-196"/>
|
||||
</g>
|
||||
<!-- user3 -->
|
||||
<g id="node12" class="node">
|
||||
<title>user3</title>
|
||||
<ellipse fill="none" stroke="#000000" cx="47.2266" cy="-142" rx="29.0257" ry="18"/>
|
||||
<text text-anchor="middle" x="47.2266" y="-137.8" font-family="Times,serif" font-size="14.00" fill="#000000">user3</text>
|
||||
</g>
|
||||
<!-- user3--sshportal2 -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>user3--sshportal2</title>
|
||||
<path fill="none" stroke="#a020f0" stroke-width="3" d="M70.6306,-152.9277C88.5836,-161.3103 113.4965,-172.9425 132.9075,-182.0059"/>
|
||||
</g>
|
||||
<!-- user3--sshportal3 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>user3--sshportal3</title>
|
||||
<path fill="none" stroke="#0000ff" stroke-width="3" d="M76.7098,-142C88.7561,-142 102.9825,-142 116.3672,-142"/>
|
||||
</g>
|
||||
<!-- userN -->
|
||||
<g id="node13" class="node">
|
||||
<title>userN</title>
|
||||
<ellipse fill="none" stroke="#000000" cx="47.2266" cy="-88" rx="31.4549" ry="18"/>
|
||||
<text text-anchor="middle" x="47.2266" y="-83.8" font-family="Times,serif" font-size="14.00" fill="#000000">userN</text>
|
||||
</g>
|
||||
<!-- userN--sshportalN -->
|
||||
<g id="edge13" class="edge">
|
||||
<title>userN--sshportalN</title>
|
||||
<path fill="none" stroke="#000000" stroke-dasharray="1,5" d="M78.5238,-88C89.4948,-88 102.0923,-88 114.1488,-88"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 8.5 KiB |
16
.assets/overview.dot
Normal file
16
.assets/overview.dot
Normal file
|
@ -0,0 +1,16 @@
|
|||
graph {
|
||||
rankdir=LR;
|
||||
node[shape=box,style=rounded,style=rounded,fillcolor=gray];
|
||||
|
||||
db[color=gray];
|
||||
|
||||
user1 -- sshportal -- host1[color=red,penwidth=3.0];
|
||||
user2 -- sshportal -- host2[color=blue,penwidth=3.0];
|
||||
user3 -- sshportal -- host1[color=purple,penwidth=3.0];
|
||||
user2 -- sshportal -- host3[color=green,penwidth=3.0];
|
||||
userN -- sshportal[style=dotted];
|
||||
sshportal -- hostN[style=dotted];
|
||||
sshportal -- db[style=dotted,color=grey];
|
||||
|
||||
{ rank=same; sshportal; db; }
|
||||
}
|
128
.assets/overview.svg
Normal file
128
.assets/overview.svg
Normal file
|
@ -0,0 +1,128 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.40.1 (20161225.0304)
|
||||
-->
|
||||
<!-- Title: %3 Pages: 1 -->
|
||||
<svg width="255pt" height="206pt"
|
||||
viewBox="0.00 0.00 254.55 206.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 202)">
|
||||
<title>%3</title>
|
||||
<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-202 250.5518,-202 250.5518,4 -4,4"/>
|
||||
<!-- db -->
|
||||
<g id="node1" class="node">
|
||||
<title>db</title>
|
||||
<path fill="none" stroke="#c0c0c0" d="M138.2759,-90C138.2759,-90 108.2759,-90 108.2759,-90 102.2759,-90 96.2759,-84 96.2759,-78 96.2759,-78 96.2759,-66 96.2759,-66 96.2759,-60 102.2759,-54 108.2759,-54 108.2759,-54 138.2759,-54 138.2759,-54 144.2759,-54 150.2759,-60 150.2759,-66 150.2759,-66 150.2759,-78 150.2759,-78 150.2759,-84 144.2759,-90 138.2759,-90"/>
|
||||
<text text-anchor="middle" x="123.2759" y="-67.8" font-family="Times,serif" font-size="14.00" fill="#000000">db</text>
|
||||
</g>
|
||||
<!-- user1 -->
|
||||
<g id="node2" class="node">
|
||||
<title>user1</title>
|
||||
<path fill="none" stroke="#000000" d="M42,-198C42,-198 12,-198 12,-198 6,-198 0,-192 0,-186 0,-186 0,-174 0,-174 0,-168 6,-162 12,-162 12,-162 42,-162 42,-162 48,-162 54,-168 54,-174 54,-174 54,-186 54,-186 54,-192 48,-198 42,-198"/>
|
||||
<text text-anchor="middle" x="27" y="-175.8" font-family="Times,serif" font-size="14.00" fill="#000000">user1</text>
|
||||
</g>
|
||||
<!-- sshportal -->
|
||||
<g id="node3" class="node">
|
||||
<title>sshportal</title>
|
||||
<path fill="none" stroke="#000000" d="M144.3291,-144C144.3291,-144 102.2226,-144 102.2226,-144 96.2226,-144 90.2226,-138 90.2226,-132 90.2226,-132 90.2226,-120 90.2226,-120 90.2226,-114 96.2226,-108 102.2226,-108 102.2226,-108 144.3291,-108 144.3291,-108 150.3291,-108 156.3291,-114 156.3291,-120 156.3291,-120 156.3291,-132 156.3291,-132 156.3291,-138 150.3291,-144 144.3291,-144"/>
|
||||
<text text-anchor="middle" x="123.2759" y="-121.8" font-family="Times,serif" font-size="14.00" fill="#000000">sshportal</text>
|
||||
</g>
|
||||
<!-- user1--sshportal -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>user1--sshportal</title>
|
||||
<path fill="none" stroke="#ff0000" stroke-width="3" d="M54.0744,-164.8143C65.5316,-158.3881 78.9716,-150.8497 90.9443,-144.1344"/>
|
||||
</g>
|
||||
<!-- sshportal--db -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>sshportal--db</title>
|
||||
<path fill="none" stroke="#c0c0c0" stroke-dasharray="1,5" d="M123.2759,-107.7902C123.2759,-101.907 123.2759,-96.0238 123.2759,-90.1406"/>
|
||||
</g>
|
||||
<!-- host1 -->
|
||||
<g id="node4" class="node">
|
||||
<title>host1</title>
|
||||
<path fill="none" stroke="#000000" d="M234.5518,-198C234.5518,-198 204.5518,-198 204.5518,-198 198.5518,-198 192.5518,-192 192.5518,-186 192.5518,-186 192.5518,-174 192.5518,-174 192.5518,-168 198.5518,-162 204.5518,-162 204.5518,-162 234.5518,-162 234.5518,-162 240.5518,-162 246.5518,-168 246.5518,-174 246.5518,-174 246.5518,-186 246.5518,-186 246.5518,-192 240.5518,-198 234.5518,-198"/>
|
||||
<text text-anchor="middle" x="219.5518" y="-175.8" font-family="Times,serif" font-size="14.00" fill="#000000">host1</text>
|
||||
</g>
|
||||
<!-- sshportal--host1 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>sshportal--host1</title>
|
||||
<path fill="none" stroke="#ff0000" stroke-width="3" d="M156.4086,-138.1341C170.0068,-145.1999 185.38,-154.0479 197.5528,-161.8875"/>
|
||||
</g>
|
||||
<!-- sshportal--host1 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>sshportal--host1</title>
|
||||
<path fill="none" stroke="#a020f0" stroke-width="3" d="M145.1224,-144.0143C159.1032,-153.0284 177.352,-163.3941 192.2807,-170.8554"/>
|
||||
</g>
|
||||
<!-- host2 -->
|
||||
<g id="node6" class="node">
|
||||
<title>host2</title>
|
||||
<path fill="none" stroke="#000000" d="M234.5518,-144C234.5518,-144 204.5518,-144 204.5518,-144 198.5518,-144 192.5518,-138 192.5518,-132 192.5518,-132 192.5518,-120 192.5518,-120 192.5518,-114 198.5518,-108 204.5518,-108 204.5518,-108 234.5518,-108 234.5518,-108 240.5518,-108 246.5518,-114 246.5518,-120 246.5518,-120 246.5518,-132 246.5518,-132 246.5518,-138 240.5518,-144 234.5518,-144"/>
|
||||
<text text-anchor="middle" x="219.5518" y="-121.8" font-family="Times,serif" font-size="14.00" fill="#000000">host2</text>
|
||||
</g>
|
||||
<!-- sshportal--host2 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>sshportal--host2</title>
|
||||
<path fill="none" stroke="#0000ff" stroke-width="3" d="M156.4086,-126C168.1574,-126 181.2313,-126 192.4212,-126"/>
|
||||
</g>
|
||||
<!-- host3 -->
|
||||
<g id="node8" class="node">
|
||||
<title>host3</title>
|
||||
<path fill="none" stroke="#000000" d="M234.5518,-90C234.5518,-90 204.5518,-90 204.5518,-90 198.5518,-90 192.5518,-84 192.5518,-78 192.5518,-78 192.5518,-66 192.5518,-66 192.5518,-60 198.5518,-54 204.5518,-54 204.5518,-54 234.5518,-54 234.5518,-54 240.5518,-54 246.5518,-60 246.5518,-66 246.5518,-66 246.5518,-78 246.5518,-78 246.5518,-84 240.5518,-90 234.5518,-90"/>
|
||||
<text text-anchor="middle" x="219.5518" y="-67.8" font-family="Times,serif" font-size="14.00" fill="#000000">host3</text>
|
||||
</g>
|
||||
<!-- sshportal--host3 -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>sshportal--host3</title>
|
||||
<path fill="none" stroke="#00ff00" stroke-width="3" d="M155.6022,-107.8686C167.5109,-101.1891 180.872,-93.695 192.2898,-87.2909"/>
|
||||
</g>
|
||||
<!-- hostN -->
|
||||
<g id="node10" class="node">
|
||||
<title>hostN</title>
|
||||
<path fill="none" stroke="#000000" d="M234.5518,-36C234.5518,-36 204.5518,-36 204.5518,-36 198.5518,-36 192.5518,-30 192.5518,-24 192.5518,-24 192.5518,-12 192.5518,-12 192.5518,-6 198.5518,0 204.5518,0 204.5518,0 234.5518,0 234.5518,0 240.5518,0 246.5518,-6 246.5518,-12 246.5518,-12 246.5518,-24 246.5518,-24 246.5518,-30 240.5518,-36 234.5518,-36"/>
|
||||
<text text-anchor="middle" x="219.5518" y="-13.8" font-family="Times,serif" font-size="14.00" fill="#000000">hostN</text>
|
||||
</g>
|
||||
<!-- sshportal--hostN -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>sshportal--hostN</title>
|
||||
<path fill="none" stroke="#000000" stroke-dasharray="1,5" d="M147.3357,-107.9514C150.577,-105.1054 153.747,-102.0806 156.5518,-99 175.9708,-77.6716 174.2647,-67.3066 192.5518,-45 194.9894,-42.0266 197.7084,-39.0146 200.4561,-36.1341"/>
|
||||
</g>
|
||||
<!-- user2 -->
|
||||
<g id="node5" class="node">
|
||||
<title>user2</title>
|
||||
<path fill="none" stroke="#000000" d="M42,-144C42,-144 12,-144 12,-144 6,-144 0,-138 0,-132 0,-132 0,-120 0,-120 0,-114 6,-108 12,-108 12,-108 42,-108 42,-108 48,-108 54,-114 54,-120 54,-120 54,-132 54,-132 54,-138 48,-144 42,-144"/>
|
||||
<text text-anchor="middle" x="27" y="-121.8" font-family="Times,serif" font-size="14.00" fill="#000000">user2</text>
|
||||
</g>
|
||||
<!-- user2--sshportal -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>user2--sshportal</title>
|
||||
<path fill="none" stroke="#0000ff" stroke-width="3" d="M54.0744,-119.8607C65.1978,-119.1729 78.1904,-119.0661 89.8945,-119.5402"/>
|
||||
</g>
|
||||
<!-- user2--sshportal -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>user2--sshportal</title>
|
||||
<path fill="none" stroke="#00ff00" stroke-width="3" d="M54.0744,-132.1393C65.1978,-132.8271 78.1904,-132.9339 89.8945,-132.4598"/>
|
||||
</g>
|
||||
<!-- user3 -->
|
||||
<g id="node7" class="node">
|
||||
<title>user3</title>
|
||||
<path fill="none" stroke="#000000" d="M42,-90C42,-90 12,-90 12,-90 6,-90 0,-84 0,-78 0,-78 0,-66 0,-66 0,-60 6,-54 12,-54 12,-54 42,-54 42,-54 48,-54 54,-60 54,-66 54,-66 54,-78 54,-78 54,-84 48,-90 42,-90"/>
|
||||
<text text-anchor="middle" x="27" y="-67.8" font-family="Times,serif" font-size="14.00" fill="#000000">user3</text>
|
||||
</g>
|
||||
<!-- user3--sshportal -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>user3--sshportal</title>
|
||||
<path fill="none" stroke="#a020f0" stroke-width="3" d="M54.0744,-87.1857C65.5316,-93.6119 78.9716,-101.1503 90.9443,-107.8656"/>
|
||||
</g>
|
||||
<!-- userN -->
|
||||
<g id="node9" class="node">
|
||||
<title>userN</title>
|
||||
<path fill="none" stroke="#000000" d="M42,-36C42,-36 12,-36 12,-36 6,-36 0,-30 0,-24 0,-24 0,-12 0,-12 0,-6 6,0 12,0 12,0 42,0 42,0 48,0 54,-6 54,-12 54,-12 54,-24 54,-24 54,-30 48,-36 42,-36"/>
|
||||
<text text-anchor="middle" x="27" y="-13.8" font-family="Times,serif" font-size="14.00" fill="#000000">userN</text>
|
||||
</g>
|
||||
<!-- userN--sshportal -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>userN--sshportal</title>
|
||||
<path fill="none" stroke="#000000" stroke-dasharray="1,5" d="M46.0956,-36.1341C48.8434,-39.0146 51.5624,-42.0266 54,-45 72.287,-67.3066 70.581,-77.6716 90,-99 92.8048,-102.0806 95.9748,-105.1054 99.216,-107.9514"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 8.2 KiB |
4
Makefile
4
Makefile
|
@ -40,3 +40,7 @@ lint:
|
|||
backup:
|
||||
mkdir -p data/backups
|
||||
cp sshportal.db data/backups/$(shell date +%s)-$(VERSION)-sshportal.sqlite
|
||||
|
||||
doc:
|
||||
dot -Tsvg ./.assets/overview.dot > ./.assets/overview.svg
|
||||
dot -Tsvg ./.assets/cluster-mysql.dot > ./.assets/cluster-mysql.svg
|
||||
|
|
38
README.md
38
README.md
|
@ -12,30 +12,16 @@ Jump host/Jump server without the jump, a.k.a Transparent SSH bastion
|
|||
|
||||
---
|
||||
|
||||
```
|
||||
┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
|
||||
DMZ │
|
||||
┌────────┐ │ ┌────────┐
|
||||
│ homer │───▶╔═════════════════╗───▶│ host1 │ │
|
||||
└────────┘ ║ ║ └────────┘
|
||||
┌────────┐ ║ ║ ┌────────┐ │
|
||||
│ bart │───▶║ sshportal ║───▶│ host2 │
|
||||
└────────┘ ║ ║ └────────┘ │
|
||||
┌────────┐ ║ ║ ┌────────┐
|
||||
│ lisa │───▶╚═════════════════╝───▶│ host3 │ │
|
||||
└────────┘ │ └────────┘
|
||||
┌────────┐ ┌────────┐ │
|
||||
│ ... │ │ │ ... │
|
||||
└────────┘ └────────┘ │
|
||||
└ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
|
||||
```
|
||||
## Overview
|
||||
|
||||
![sshportal overview](https://raw.github.com/moul/sshportal/master/.assets/overview.svg?sanitize=true)
|
||||
|
||||
## Features
|
||||
|
||||
* Single autonomous binary (~10-20Mb) with no runtime dependencies (embeds ssh server and client)
|
||||
* Portable / Cross-platform
|
||||
* Store data in Sqlite3 or MySQL (probably easy to add postgres, mssql thanks to gorm)
|
||||
* Stateless -> horizontally scalable when using MySQL as the backend
|
||||
* Store data in [Sqlite3](https://www.sqlite.org/) or [MySQL](https://www.mysql.com) (probably easy to add postgres, mssql thanks to gorm)
|
||||
* Stateless -> horizontally scalable when using [MySQL](https://www.mysql.com) as the backend
|
||||
* Connect to remote host using key or password
|
||||
* Admin commands can be run directly or in an interactive shell
|
||||
* Host management
|
||||
|
@ -345,6 +331,18 @@ $
|
|||
|
||||
the `healtcheck` user can be changed using the `healthcheck-user` option.
|
||||
|
||||
## Scaling
|
||||
|
||||
`sshportal` is stateless but relies on a database to store configuration and logs.
|
||||
|
||||
By default, `sshportal` uses a local [sqlite](https://www.sqlite.org/) database which isn't scalable by design.
|
||||
|
||||
You can run multiple instances of `sshportal` sharing a same [MySQL](https://www.mysql.com) database, using `sshportal --db-conn=user:pass@host/dbname?parseTime=true --db-driver=mysql`.
|
||||
|
||||
![sshportal cluster with MySQL backend](https://raw.github.com/moul/sshportal/master/.assets/cluster-mysql.svg?sanitize=true)
|
||||
|
||||
See [examples/mysql](http://github.com/moul/sshportal/tree/master/examples/mysql).
|
||||
|
||||
## Under the hood
|
||||
|
||||
* Docker first (used in dev, tests, by the CI and in production)
|
||||
|
@ -362,7 +360,7 @@ the `healtcheck` user can be changed using the `healthcheck-user` option.
|
|||
* https://github.com/mgutz/ansi: Terminal color helpers
|
||||
* https://github.com/urfave/cli: CLI flag parsing with subcommands support
|
||||
|
||||
[SQL schema](https://github.com/moul/sshportal/blob/master/.assets/sql-schema.svg)
|
||||
![sshportal data model](https://raw.github.com/moul/sshportal/master/.assets/sql-schema.svg?sanitize=true)
|
||||
|
||||
## Note
|
||||
|
||||
|
|
Loading…
Reference in a new issue