TxThinkingInc / brook-user-system

A sample implementation of [Brook User System](https://github.com/txthinking/brook/blob/master/protocol/user.md)
MIT License
7 stars 2 forks source link

Traffic count isn't working #1

Closed aliir74 closed 3 months ago

aliir74 commented 3 months ago

Hey!

Thank you for your sample user management system.

I created a task to count traffic consumption but it wouldnt work. Is there any specific settings that I need to apply?

I created a task with ssh public key and with addressing pid and log keys. Also changed their permission to 777 but it didnt help.

txthinking commented 3 months ago

the task require private key. you can see the error: joker log ID

aliir74 commented 3 months ago

You're right. I mistakenly said public_key. I put private key actually.

The logs are saying:

...
sshexec -s ' ip:port' -u 'root' -k '/tmp/sshkey' --download '/root/brook/log.txt' --to '/tmp/_' --timeout 600
sh: 1: sshexec: not found
command sshexec -s ' ip:port' -u 'root' -k '/tmp/sshkey' --download '/root/brook/log.txt' --to '/tmp/_' --timeout 600 failed
sshexec -s ' ip:port' -u 'root' -k '/tmp/sshkey' --download '/root/brook/log.txt' --to '/tmp/_' --timeout 600
sh: 1: sshexec: not found
command sshexec -s ' ip:port' -u 'root' -k '/tmp/sshkey' --download '/root/brook/log.txt' --to '/tmp/_' --timeout 600 failed
sshexec -s ' ip:port' -u 'root' -k '/tmp/sshkey' --download '/root/brook/log.txt' --to '/tmp/_' --timeout 600
sh: 1: sshexec: not found
command sshexec -s ' ip:port' -u 'root' -k '/tmp/sshkey' --download '/root/brook/log.txt' --to '/tmp/_' --timeout 600 failed
txthinking commented 3 months ago

sorry, I forget sshexec, just

nami install sshexec
aliir74 commented 3 months ago

Thank you. It fixed the problem.