Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NetBird SSH #361

Merged
merged 53 commits into from
Jun 23, 2022
Merged
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
fbdbf9e
Add SSH server
braginini Jun 6, 2022
39b222b
Add SSH config to the Management gRPC protocol
braginini Jun 6, 2022
f8fe1f5
Add SSH roundtrip
braginini Jun 6, 2022
e7547d0
Generate SSH key on startup and pass to Management
braginini Jun 6, 2022
e063086
Update SSH key on management
braginini Jun 6, 2022
6557a55
Add PTY to SSHServer
braginini Jun 6, 2022
f507428
Cleanup SSH code a bit
braginini Jun 7, 2022
ff5d961
Merge remote-tracking branch 'origin/main' into feature/ssh
braginini Jun 12, 2022
4bdeceb
Add SSH cmd
braginini Jun 12, 2022
bf69b1c
Add SSH cmd port flag
braginini Jun 12, 2022
71e82b7
Use ED25519 keys
braginini Jun 12, 2022
414fafa
Fix build on windows
braginini Jun 12, 2022
c53e3b1
Use local SSH key to connect to the remote NetBird SSH server
braginini Jun 12, 2022
5491d95
Add missing SSH method to account manager mock
braginini Jun 12, 2022
3a2ea46
Fix golint issues
braginini Jun 12, 2022
2cf8ed6
Fix codacy
braginini Jun 12, 2022
47c7993
Fix codacy
braginini Jun 12, 2022
136dedd
Associate public WG key with SSH key
braginini Jun 13, 2022
5f23382
Minor refactor
braginini Jun 13, 2022
e40c84d
Add Remove and Add authorized keys test
braginini Jun 13, 2022
30683d7
Test Multiple SSH keys
braginini Jun 13, 2022
1f42452
Add Engine test for SSH server
braginini Jun 13, 2022
e6773d1
Add SSH server interface
braginini Jun 13, 2022
aa57c3d
Fix codacy issues
braginini Jun 13, 2022
c14e26b
Verify SSH server usage in Engine
braginini Jun 13, 2022
fecb0c9
Stop engine after SSH test finished
braginini Jun 14, 2022
840d8b7
Merge branch 'main' into feature/ssh
braginini Jun 14, 2022
81f475a
go mod tidy
braginini Jun 14, 2022
49997fd
Trigger network map sync when SSH key has been added
braginini Jun 14, 2022
59444b4
Fix shell type when SSH to the embedded server
braginini Jun 15, 2022
6bc11db
Use a separate obj for peer keys in gRPC protocol
braginini Jun 15, 2022
09146c7
Add UpdatePeer method
braginini Jun 16, 2022
3e74090
Sync network map when updating peer
braginini Jun 21, 2022
20d9059
Fix deadlock when distributing network updates
braginini Jun 21, 2022
f748e57
Let pre-shared key to be removed
braginini Jun 21, 2022
14bcfea
Clean SSH server when failed to start
braginini Jun 22, 2022
11d7c2e
Use different interface name in engine test
braginini Jun 22, 2022
1d803a4
Rename sshKey to pubSSHKey not to confuse with a private key
braginini Jun 22, 2022
12a6e07
Avoid single letter variable definition
braginini Jun 22, 2022
99b1ddd
Avoid single letter variable definition
braginini Jun 22, 2022
75052a1
Replace SSH port to 44337
braginini Jun 22, 2022
98b003f
Replace SSH port to 44338
braginini Jun 22, 2022
56a6277
Fix engine test on failing SSH server
braginini Jun 22, 2022
bfdde79
Fix lint issues
braginini Jun 22, 2022
9cb50c2
Decrease log level
braginini Jun 22, 2022
823a343
Close SSH sessions on SSH server stop
braginini Jun 22, 2022
d370cd4
Fix Codacy issues
braginini Jun 22, 2022
10829cb
Check if admin when running SSH
braginini Jun 23, 2022
9a188ef
Fix SSH client on windows
braginini Jun 23, 2022
8acfc30
Remove panic when error on starting pty
braginini Jun 23, 2022
fbed2ae
Disable SSH server on Windows - not supported
braginini Jun 23, 2022
60c9c45
Skip SSH server test on Windows
braginini Jun 23, 2022
b92d9a9
Avoid single letter variables
braginini Jun 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
go mod tidy
braginini committed Jun 14, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 81f475a6104f4f9d8c70830b5355a1cf43564209
9 changes: 2 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
@@ -119,7 +119,6 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
@@ -651,14 +650,13 @@ golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM=
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220513210258-46612604a0f9 h1:NUzdAbFtCJSXU20AOXgeqaUwg8Ypg4MPYmL+d+rsB5c=
golang.org/x/crypto v0.0.0-20220513210258-46612604a0f9/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -900,9 +898,6 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220513210249-45d2b4557a2a h1:N2T1jUrTQE9Re6TFF5PhvEHXHCguynGhKjWVsIUt5cY=
golang.org/x/sys v0.0.0-20220513210249-45d2b4557a2a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=