33This file contains some general directions and thoughts on troubleshooting the code in this repo. This is not meant
44to be a comprehensive troubleshooting guide and is only a jumping off point.
55
6- # kssh is slow, but it works
6+ ## kssh is slow, but it works
77
88When kssh starts, it has to search every team you are in for a ` kssh-client.config ` file which specifies the information
99that is needed in order to communicate with the CA chatbot. If you are only in a few teams, this is relatively fast
1010(1-2 seconds for <10 teams) but this can become much slower as the number of teams increases (6 seconds for 100 teams
1111in my benchmarks). This complex start up procedure can be avoided by setting a default bot via
1212` kssh --set-default-bot cabotname ` which should reduce kssh's startup time considerably.
1313
14- # kssh times out
14+ ## kssh times out
1515
1616If kssh times out with a message similar to:
1717
@@ -27,11 +27,35 @@ by inspecting the chat messages inside of the teams configured with the chatbot.
2727` AckRequest ` messages going back and forth prior to a ` Signature_Request: ` and a ` Signature_Response: ` exchange. Ensure
2828that you and the chatbot are in the correct teams such that they can read and respond to the messages.
2929
30- # SSH rejects the connection
30+ ## SSH rejects the connection
3131
3232This likely means that you have not configured the SSH server correctly. Review the directions in README.md and ensure
3333that you have followed the steps correctly ([ sshca.md] ( ./sshca.md ) also has some additional information on how SSH CAs work that may
3434be helpful). If you would like to follow an example, see the code in the ` tests/ ` directory which contains integration
3535tests (focus on Dockerfile-sshd for an example SSH server setup). If none of that works, the best strategy is to run
3636SSH on the server on an alternate port and review the debug information. On the server run ` /usr/sbin/sshd -dd -D -p 2222 `
3737and on the client run ` kssh -p 2222 user@server ` and inspect the debug logs.
38+
39+ ## Keybase is down
40+
41+ If Keybase is down, the bot will not work since it relies on Keybase chat for communication. In this scenario, you can
42+ manually sign SSH keys with the CA key. Place the CA private key in ` ~/cakey ` and the CA public key in ` ~/cakey.pub ` .
43+ Then run the command:
44+
45+ ``` bash
46+ ssh-keygen \
47+ # The location of the ca key:
48+ -s ~ /cakey \
49+ # A unique ID for each key. Used to audit key usage
50+ -I unique-key-id \
51+ # The comma separated list of principals you wish to sign the key for. Eg "team.ssh.prod,team.ssh.staging,team.ssh.root_everywhere"
52+ -n " team.ssh.prod,team.ssh.staging,team.ssh.root_everywhere" \
53+ # How long the signature is valid for. +1d means one day. Valid units are `h` for hour, `d` for day, `w` for week
54+ -V +1d \
55+ # Specify the password on the CA key (if exported via `keybaseca backup` there is no password)
56+ -N " " \
57+ # The location of the public key you wish to sign
58+ ~ /.ssh/id_rsa.pub
59+ ```
60+
61+ You can then use the signed SSH key to SSH via ` ssh -i ~/.ssh/id_rsa user@server ` .
0 commit comments