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

How to keep the fingerprint same as last start #443

Closed
welyss opened this issue Aug 22, 2023 · 2 comments
Closed

How to keep the fingerprint same as last start #443

welyss opened this issue Aug 22, 2023 · 2 comments

Comments

@welyss
Copy link

welyss commented Aug 22, 2023

Hi, situation is:

region A(server reverse):
chisel server --port 1234 --keepalive=0s --tls-cert=xxx.crt --tls-key=yyy.key --reverse

region B(client):
nohup chisel client -v --fingerprint '31LOQeYl2uQqwvMEKBUk9/M2z2h2w5pMRs/+qrDWAlY=' --tls-skip-verify https://a.b.c.d:1234 R::12000:10.xxx.xxx.xxx:3306 >/var/log/chisel.log 2>&1 &

region C(client):
nohup chisel client -v --fingerprint '31LOQeYl2uQqwvMEKBUk9/M2z2h2w5pMRs/+qrDWAlY=' --tls-skip-verify https://a.b.c.d:1234 R::12001:10.xxx.xxx.xxx:3306 >/var/log/chisel.log 2>&1 &

region D,E...

it works very well, but if there is something wrong on region A, server restart, then fingerprint will be changed, so we have to restart all of client and reset a new fingerprint to connect with server. is there any way to keep the fingerprint unchanged,thanks

@Servostar
Copy link

Maybe the --keygen and --key argument will help you out. Haven't tried it but maybe something like this might be helpful:
chisel --keygen /path/to/keyfile.key --key -
This will generate a private key and write it to a file. It also outputs the fingerprint to stdout.
If using docker the generated key file should probably be stored in a volume or mounted somewhere safe in order to make it persistent.

@welyss
Copy link
Author

welyss commented Sep 4, 2023

@Servostar Thanks for help!

chisel server --keygen /path/to/keyfile.key
chisel server --keyfile /path/to/keyfile.key

Works very well

@welyss welyss closed this as completed Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants