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

Resolving multiple auth requests #175

Open
evanaze opened this issue May 3, 2020 · 15 comments
Open

Resolving multiple auth requests #175

evanaze opened this issue May 3, 2020 · 15 comments

Comments

@evanaze
Copy link

evanaze commented May 3, 2020

I thought I was pretty slick with my current solution to using code-server with sshcode from Mac to my Ubuntu machine: ~/workspace/.server/sshcode --upload-code-server ~/workspace/.server/code-server me@my_ip, but I am consistently getting this error:
ERROR failed to start SSH master connection: SSH master wasn't ready on time: max number of tries exceeded: 30.

After this point I am forced to authenticate multiple times. Anybody know how to resolve the need for multiple authentications? The error is risen from this section in the source code: if o.reuseConnection {...} when starting the master connection socket.
I am running sshcode 0.10.0 and code-server 3.2.0. Thanks!

@Merith-TK
Copy link
Contributor

can you post the entirety of your terminal output? from the moment you open the terminal, to when you close code-server?

@evanaze
Copy link
Author

evanaze commented May 4, 2020

 ~  ~/workspace/.server/sshcode --upload-code-server ~/workspace/.server/code-server evan@my_ip
2020-05-03 19:05:42 INFO	starting SSH master connection...
Enter passphrase for key '/Users/evanazevedo/.ssh/id_rsa':
evan@my_ip's password:
2020-05-03 19:06:12 ERROR	failed to start SSH master connection: SSH master wasn't ready on time: max number of tries exceeded: 30
2020-05-03 19:06:12 INFO	uploading local code-server binary...
Enter passphrase for key '/Users/evanazevedo/.ssh/id_rsa':
evan@my_ip's password:
building file list ... done

sent 92 bytes  received 20 bytes  9.74 bytes/sec
total size is 582  speedup is 5.20
Enter passphrase for key '/Users/evanazevedo/.ssh/id_rsa':
evan@my_ip's password:
2020-05-03 19:06:29 INFO	syncing settings
Enter passphrase for key '/Users/evanazevedo/.ssh/id_rsa':
evan@my_ip's password:
building file list ... done
deleting state/global.json
deleting state/144d15a3.json
deleting state/
./

sent 333 bytes  received 26 bytes  65.27 bytes/sec
total size is 385649  speedup is 1074.23
2020-05-03 19:06:34 INFO	synced settings in 4.938063272s
2020-05-03 19:06:34 INFO	syncing extensions
Enter passphrase for key '/Users/evanazevedo/.ssh/id_rsa':
evan@my_ip's password:
building file list ... done

sent 254340 bytes  received 20 bytes  26774.74 bytes/sec
total size is 389093594  speedup is 1529.70
2020-05-03 19:06:43 INFO	synced extensions in 14.346690576s
2020-05-03 19:06:43 INFO	starting code-server...
2020-05-03 19:06:43 INFO	Tunneling remote port 12364 to 127.0.0.1:27639
Enter passphrase for key '/Users/evanazevedo/.ssh/id_rsa':
evan@my_ip's password:
info  Server listening on http://127.0.0.1:12364
info    - No authentication
info    - Not serving HTTPS

Then it loads successfully. I close it and the output is:

2020-05-03 19:08:58 INFO	shutting down
2020-05-03 19:08:58 ERROR	failed to send SIGTERM to SSH master process: os: process already finished

@evanaze evanaze changed the title Resolving Resolving multiple auth requests May 5, 2020
@Bai-Li
Copy link

Bai-Li commented May 6, 2020

I am experiencing the same issue on MacOS (local) and ubuntu (remote). I can eventually log in, but it always takes a failure and several attempts to do so. The terminal output is similar.

@Merith-TK
Copy link
Contributor

currently the only fix for this that i can think of, is using an sshkey

@evanaze
Copy link
Author

evanaze commented May 8, 2020

Doesn't Enter passphrase for key '/Users/evanazevedo/.ssh/id_rsa': Show that I am using an sshkey?

@Merith-TK
Copy link
Contributor

oh, Sorry not used to seeing that,
Could not be properly forming a "master" ssh connection
I know this had to be disabled on msys2 builds in my fork when on windows
If i had a Mac i would test this out.

when sshcode is running, after the first password prompt

	sshDirectory               = "~/.ssh"
	sshDirectoryUnsafeModeMask = 0022
	sshControlPath             = sshDirectory + "/control-%h-%p-%r"

is there a control-*-*-* file in your ~/.ssh directory?

@evanaze
Copy link
Author

evanaze commented May 9, 2020

Yes, there are two. One with the name of my local machine and the other with the name of the one I am trying to ssh into.

Also may be worth mentioning, is that I am attempting to use this with Ubuntu 18.04.

@Merith-TK
Copy link
Contributor

I think you already mentioned that.

are those files there when sshcode is not running?

@evanaze
Copy link
Author

evanaze commented May 15, 2020

Yes, they are still there.

@Merith-TK
Copy link
Contributor

try deleting them
you may have to use sudo

@evanaze
Copy link
Author

evanaze commented May 15, 2020

Thanks. I deleted them and ran sshcode. I got this error:

error: failed to sync extensions: failed to rsync '/Users/evanazevedo/.vscode/extensions/' to 'evan@my-ip:~/.local/share/code-server/extensions/': exit status 23

@Merith-TK
Copy link
Contributor

does the folder exist on both machines?

@Merith-TK
Copy link
Contributor

or if you dont care for syncing, --skipsync

@evanaze
Copy link
Author

evanaze commented May 15, 2020

I just checked, and both of the directories exist. And they seem to be identical. I also just tried running sshcode both with and without --skipsync and I am getting the same error in the original posting.

Do you think it may have to do with me running Ubuntu 18.04 on my remote machine?

@Merith-TK
Copy link
Contributor

No, it works just fine for me on my machine, I run ubuntu 18.04 as well on the remote, as well as arch.
Clients im testing with are Arch and windows 10

Pretty much the only difference between our setups are as follows

  1. Your using MacOS
  2. your using a password protected key.

can you temporarily use no sshkey? or is that out of the option?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants