homebridge ssh connection wrong username - ssh

im trying to use a ssh plugin for the homebridge to turn off my truenas. if havve the following config
{
"accessory": "SSH",
"name": "Remote Command",
"command": "sudo shutdown -h now",
"sshConfig": {
"host": "truenas",
"username": "root",
"privateKey": "/home/pi/dev/SSH Shutdown/privatekey.ssh"
}
}
im getting the error
Error: Invalid username
at Client.connect (/usr/lib/node_modules/homebridge-ssh/node_modules/ssh2/lib/client.js:130:11)
at connect (/usr/lib/node_modules/homebridge-ssh/node_modules/ssh-exec/index.js:53:12)
at ReadFileContext.callback (/usr/lib/node_modules/homebridge-ssh/node_modules/ssh-exec/index.js:109:7)
at FSReqCallback.readFileAfterOpen [as oncomplete] (node:fs:314:13)
The SSH connection with that username and private key is working from the same pi. I tested that. I tried the same with another user and got the same error.
can someone help? Am I missing someothing obvisous?

Related

influxdb2.4.0 set auth error authorization not found

i'm a new influxdb user and i want to deploy influxdb2 on a linux server without root authority
so i use influxd from influxdb2-2.4.0-linux-amd64.tar.gz as influxdb and influx from influxdb2-client-2.4.0-linux-amd64.tar.gz as influx-cli.
my influxdb use command
./influxd
to start with config.yaml in the same path, the yaml config is
bolt-path: mypath/.influxdbv2/influxd.bolt
engine-path: mypath/.influxdbv2/engine
http-bind-address: ":18088"
instance-id: ":18088"
sqlite-path: mypath/.influxdbv2/influxd.sqlite
log-level: debug
after start influxdb I connect it by influx with command
./influx config create --active -n test_config -u http://localhost:18088 -t test1234 -o test-org --config-path "mypath/.influxdbv2/config"
(becasue i dont have root authority so i have to save my cli config into another path instead of default)
but after I create config and try to view auth list with command
./influx auth list --config-path "mypath/.influxdbv2/config
I got an Error "Error: could not find authorization with given parameters: 401 Unauthorized: unauthorized access"
and see the text below in the influxdb log
2022-09-30T09:02:51.147998Z info Unauthorized {"log_id": "0dFLgdmW000", "error": "authorization not found"}
2022-09-30T09:02:51.148198Z debug Request {"log_id": "0dFLgdmW000", "service": "http", "method": "GET", "host": "localhost:18088", "path": "/api/v2/authorizations", "query": "", "proto": "HTTP/1.1", "status_code": 401, "response_size": 55, "content_length": 0, "referrer": "", "remote": "[::1]:18370", "user_agent": "influx", "took": "0.263ms", "error": "unauthorized", "error_code": "unauthorized", "body": ""}
I tried ./influx with flag -t "test1234" bug get same return and I wonder how can I handle this problem
Could anyone help me :)

Connecting to ssh using sshfs visual studio code

I'm trying to connect to a ssh connection so that edits to my workspace in VSCode will be reflected on the remote folder. I'm using the SSH FS extension in visual studio code. I've set up the configuration in user settings like this.
"sshfs.configs": [
{
"label": "Linode connection",
"root": "/",
"host": "123.45.678.910",
"port": 22,
"username": "xxxx",
"password": "yyyyy",
"name": "abcd"
}
]
When I select the "connect as workspace folder" option, I end up with this error.
Is is something to do with filling the 'name' tag in wrong? I'm not really sure about what should go in there? If thats not it, what do I do to connect?
Thanks.
Try to remove the password key and value and then try to connect again, VS Code will ask you for the password of remote machine each once you need.

Unable to connect to a site from Testcafe IDE on OSX

My fixtures are set up like so
{
"fixtures": [
{
"name": "login",
"pageUrl": "http:\/\/localhost:3000\/",
"tests": [
{
"name": "type name",
"commands": [
{
"type": "type-text",
"studio": {
},
"callsite": "0",
"selector": {
"type": "js-expr",
"value": "input[type=email]"
},
"options": {
},
"text": "example#email.com"
}
]
}
]
}
]
}
with one simple test to find the input and type some text but when running the command I get
testcafe chrome login.testcafe
ERROR Unable to establish one or more of the specified browser connections. This can be caused by network issues or remote device failure.
Type "testcafe -h" for help.
I've seen this issue a couple of times on their issues board one relating to CI integration on a Linux server and another which seems like a similar issue of trying to connect to localhost
https://github.com/DevExpress/testcafe-browser-provider-electron/issues/20
https://github.com/DevExpress/testcafe/issues/1133
New to testcafe any help would be appreciated!
I've found the solution some network policies don't allow access to your machine on some ports in my example it's 57501.
testcafe chrome login.testcafe --hostname localhost
adding --hostname resolves the issue
documentation
https://devexpress.github.io/testcafe/documentation/using-testcafe/command-line-interface.html#--hostname-name
I still don't know how to launch from the IDE but this resolves my main issue.
TestCafe Studio Preview does not support setting command line options (hostname in your case). The TestCafe team is going to implement this functionality in the official release.
So, for now, it is only possible to run tests via a command line.
UPDATE:
You can set the hostname option in the TestCafe Studio Settings dialog:

My AKS Cluster was brought down, how can I recover?

I have been playing around with load-testing my application on a single agent cluster in AKS. During the testing, the connection to the dashboard stalled and never resumed. My application seems down as well, so I am assuming the cluster is in a bad state.
The API server is restate-f4cbd3d9.hcp.centralus.azmk8s.io
kubectl cluster-info dump shows the following error:
{
"name": "kube-dns-v20-6c8f7f988b-9wpx9.14fbbbd6bf60f0cf",
"namespace": "kube-system",
"selfLink": "/api/v1/namespaces/kube-system/events/kube-dns-v20-6c8f7f988b-9wpx9.14fbbbd6bf60f0cf",
"uid": "47f57d3c-d577-11e7-88d4-0a58ac1f0249",
"resourceVersion": "185572",
"creationTimestamp": "2017-11-30T02:36:34Z",
"InvolvedObject": {
"Kind": "Pod",
"Namespace": "kube-system",
"Name": "kube-dns-v20-6c8f7f988b-9wpx9",
"UID": "9d2b20f2-d3f5-11e7-88d4-0a58ac1f0249",
"APIVersion": "v1",
"ResourceVersion": "299",
"FieldPath": "spec.containers{kubedns}"
},
"Reason": "Unhealthy",
"Message": "Liveness probe failed: Get http://10.244.0.4:8080/healthz-kubedns: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)",
"Source": {
"Component": "kubelet",
"Host": "aks-agentpool-34912234-0"
},
"FirstTimestamp": "2017-11-30T02:23:50Z",
"LastTimestamp": "2017-11-30T02:59:00Z",
"Count": 6,
"Type": "Warning"
}
As well as some Pod Sync errors in Kube-System.
Example of issue:
az aks browse -g REstate.Server -n REstate
Merged "REstate" as current context in C:\Users\User\AppData\Local\Temp\tmp29d0conq
Proxy running on http://127.0.0.1:8001/
Press CTRL+C to close the tunnel...
error: error upgrading connection: error dialing backend: dial tcp 10.240.0.4:10250: getsockopt: connection timed out
You'll probably need to ssh to the node to see if the Kubelet service is running. For future you can set Resource quotas from exhausting all resources in the cluster nodes.
Resource Quotas -https://kubernetes.io/docs/concepts/policy/resource-quotas/

ssh connection refused when deploying meteor app from nitrous.io to Linode server using meteor up

See https://github.com/arunoda/meteor-up/issues/171
I am trying to deploy my meteor app from my nitrous box to a remote server in Linode.
I follow the instruction in meteor up and got
Invalid mup.json file: Server username does not exit
mup.json
// Server authentication info
"servers": [
{
"host": "123.456.78.90",
// "username": "root",
// or pem file (ssh based authentication)
"pem": "~/.ssh/id_rsa",
"sshOptions": { "Port": 1024 }
}
]
So I uncomment the username: "roote line in mup.json and I did mup logs -n 300 and got the following error:
[123.456.78.90] ssh: connect to host 123.456.78.90 port 1024: Connection refused
I suspect I may did something wrong in setting up the SSH key. I can access my remote server without password after setting up my ssh key in ~/.ssh/authorized_keys.
The content of the authorized_keys looks like this:
ssh-rsa XXXXXXXXXX..XXXX== root#apne1.nitrousbox.com
Do you guys have any ideas of what went wrong?
Problem solved by uncommenting the username and changing the port to 22:
// Server authentication info
"servers": [
{
"host": "123.456.78.90",
"username": "root",
// or pem file (ssh based authentication)
"pem": "~/.ssh/id_rsa",
"sshOptions": { "Port": 22 }
}
]