Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

Sharing session using file-based identity requires the private key #19

Open
samscott89 opened this issue Jan 26, 2017 · 2 comments · May be fixed by #40
Open

Sharing session using file-based identity requires the private key #19

samscott89 opened this issue Jan 26, 2017 · 2 comments · May be fixed by #40
Assignees

Comments

@samscott89
Copy link

Using the -i command line switch with an identity file requires providing the private SSH key, and proceeds to derive the public key from it.

Unless I'm missing how the keys are used, that doesn't seem to be the implied functionality from the blog post.

Example:

teleconsole -i ~/.ssh/id_tele.pub -vv
DEBU[0000] Server: https://teleconsole.com:443, Args: []  file=clt/main.go:39 func=clt.(*App).DebugDump
INFO[0000] Ping http://eu.teleconsole.com/ping           file=geo/geo.go:41 func=geo.FindFastestEndpoint.func1
INFO[0000] Ping http://as.teleconsole.com/ping           file=geo/geo.go:41 func=geo.FindFastestEndpoint.func1
INFO[0000] Ping http://teleconsole.com/ping              file=geo/geo.go:41 func=geo.FindFastestEndpoint.func1
INFO[0000] eu.teleconsole.com responded in 473.992811ms  file=geo/geo.go:60 func=geo.FindFastestEndpoint
INFO[0000] Getting version from https://eu.teleconsole.com:443  file=clt/api_client.go:71 func=clt.(*APIClient).CheckVersion
INFO[0002] Connecting to https://eu.teleconsole.com:443  file=clt/api_client.go:105 func=clt.(*APIClient).CheckVersion
ERRO[0002] ssh: no key found                             file=lib/identity.go:86 func=lib.MakeIdentity
ssh: no key found
DEBU[0002] 
ERROR REPORT:
Original Error: *errors.errorString ssh: no key found
Stack Trace:
	/home/ekontsevoy/go/src/github.com/gravitational/teleconsole/lib/identity.go:179 github.com/gravitational/teleconsole/lib.loginFromFile
	/home/ekontsevoy/go/src/github.com/gravitational/teleconsole/lib/identity.go:137 github.com/gravitational/teleconsole/lib.loginsFrom
	/home/ekontsevoy/go/src/github.com/gravitational/teleconsole/lib/identity.go:82 github.com/gravitational/teleconsole/lib.MakeIdentity
	/home/ekontsevoy/go/src/github.com/gravitational/teleconsole/clt/clt.go:72 github.com/gravitational/teleconsole/clt.StartBroadcast
	/home/ekontsevoy/go/src/github.com/gravitational/teleconsole/clt/main.go:182 github.com/gravitational/teleconsole/clt.(*App).Start
	/home/ekontsevoy/go/src/github.com/gravitational/teleconsole/main.go:45 main.main
	/opt/go/src/runtime/proc.go:192 runtime.main
	/opt/go/src/runtime/asm_amd64.s:2087 runtime.goexit
User Message: 
  file=teleconsole/main.go:61 func=main.fatalIf

For reference it does work using teleconsole -i ~/.ssh/id_tele.

This means that both client and server need to have the private key for this to work which kind of defeats the purpose.

@kontsevoy kontsevoy self-assigned this Jan 27, 2017
@kontsevoy
Copy link
Contributor

@samscott89 looking into it, thanks.

@shadiakiki1986
Copy link

shadiakiki1986 commented Dec 9, 2017

Can confirm this. Doesn't make sense to send the private key to the server

Edit: Btw this contradicts with the comment lib/identity.go#L37.

Added a PR (link below)

shadiakiki1986 added a commit to shadiakiki1986/teleconsole that referenced this issue Dec 9, 2017
@shadiakiki1986 shadiakiki1986 linked a pull request Dec 9, 2017 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants