-
-
Notifications
You must be signed in to change notification settings - Fork 140
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
Command line tool to shellshub #1324
Comments
@leoheck thanks for contacting us. Take a look at https://docs.shellhub.io/user-manual/devices/connecting/ |
Thanks, I don't need to use shellhub. These browser only applications slow down the whole process. I don't need it at all. But these guys from my team is using it. So, then I was thinking that it would be perfect if you guys coud have a command line tool that connects to the shellhub and allows easy access to the machines there. This would be a real improvement for shelhub. |
As mentioned, it is possible to connect from command line as explained on the link I pointed above. |
Maybe I am failing to explain this. I know how use the ssh. I know how to use the shellhub to connect into a device. Now, what I am saying is to have a tool (command line tool), lets call it shellhub then we cloud do like this connect to the platform with my credentials This is going to ask my password and will give me a terminal with some commands like list_devices Then a advanced user could use this form the command line, and also from a computer that does not provide any gui. |
A command-line UI is indeed a very good idea. We need people to help to do it thought. Are you willing to help here? |
Yeah, definitely. Do you have any info to share to get access so I can try
something? I was trying briefly to get access to the website from the
command line with curl yesterday but the very quick test I made I was
seeing a response saying I needed javascript support.
…--
Leandro Heck
On Mon, Oct 4, 2021 at 11:07 PM Otavio Salvador ***@***.***> wrote:
A command-line UI is indeed a very good idea. We need people to help to do
it thought. Are you willing to help here?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1324 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJX7YAZTD7ETMFKMNYKISTUFJMVHANCNFSM5FKIM7QA>
.
|
We're publishing the OpenAPI docs in next release. Those are a good reference. |
Beautiful, thanks.
|
@gustavosbarreto do you have any example of how I can get a list of my devices with curl? |
more precisely, a list of the ssid fields |
Alright, this is working fine for me.
Now, how do I get the devices list? I am not getting the devices with this command |
It looks like it is getting a single computer. |
Ah, it has query parameters. It would be good to have some examples of the payload in the right panel, maybe. |
ah, it looks like what I want to access is this. |
Or maybe not. There is something weird going on. |
How do I show all my devices? I can just list one. I have at least 20. Do you have any idea? |
Alright, it looks that I am just seeing one of the namespaces. How do I change the namespace? |
@henrybarreto can you please take a look into this? |
Yes, I can. I'll check what is happening. |
Hi, Leo. If I'm not misleading,
|
Hi. The -d or --data (to send a json) are the same as you are showing. I
got more data with the session list instead of the devices list
My current issue is how do I change the namespace. Those commands access my
development namespace and couldn't find any way to change the namespace yet.
…On Wed, Dec 1, 2021, 23:17 Henry Barreto ***@***.***> wrote:
How do I show all my devices? I can just list one. I have at least 20. Do
you have any idea?
Even after using this, I am just getting the first one. [image: image]
<https://user-images.githubusercontent.com/1277920/144286672-dfd73c77-2ac5-464b-afc6-3609b500b674.png>
This is what I am trying right now. [image: image]
<https://user-images.githubusercontent.com/1277920/144286748-0f39ca0f-821f-4df3-8c27-5c1414dedd6c.png>
How do I show all my devices? I can just list one. I have at least 20. Do
you have any idea?
Hi, Leo.
If I'm not misleading, --data in cURL is to send a data inside the
request's body, but to list devices, you need to send it as query
parameters, so your request will become this:
curl -s -X GET -H 'Authorization: Bearer token' -H 'Accept: application/json' 'localhost/api/devices?per_page=20&page=1'
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1324 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJX7YCNWI42BVTEJNUITEDUO3JKFANCNFSM5FKIM7QA>
.
|
Sorry, so. :D To "change" namespace, you need to do a GET request to |
This was my last try some minutes ago. Let me check... AH, it looks like the Please, check your API docs, it looks like it misses this info |
perfect, got the token. now, how do I use it? it is just a matter of replacing the normal token I was using? |
Okay. It is true; I've forgotten this route. As soon as possible, I'll add this. Thank you :D |
Exactly. |
Any suggestion on how do I use the token? Just replacing the token I as using did not work. |
ah it worked. it happens that it has just 1 device and no active sessions. |
:D So... Everything is okay? |
Nice, now it is working! Thank you guys |
Yeah. I was able to get all devices, on all my namespaces. |
Your docs could have curl commands as an example of each command because they are easy to test. Some APIs have this kind of thing. I will share my simple script tomorrow, you could use something to help you improve the docs, if needed. |
Yeah, you are right, and I'll do. The API documentation have some points to be improved; examples is one of them. It seems that your script will be helpful. |
I put some commands I was using, on a gist here I am also using |
hello guys! |
Hello @diegofpk, Please take a look at this link https://docs.shellhub.io/user-guides/devices/connecting#command-line-ssh-client to learn how to connect to a device using the SSH command line. It's a helpful guide that will walk you through the steps you need to take to establish a secure connection. Let me know if you have any questions or need further assistance! |
Hello, how do I connect shellhub form ssh? Do you have any tutorial?
The text was updated successfully, but these errors were encountered: