Hi
Its me again
I wish to ssh to a target server (say, a.b.c.d) from gambas.
I know i could use some "exec" trics, but does gambas provide a way to use ssh or curl or anything to quickly check the last few line on a file in an web server? thank you
ssh from gambas on linux
Re: ssh from gambas on linux
As far as I know there are no Gambas wrappers for ssh.
I don't really know what you want to do, but if the web server belongs to you then you could use Sockets (gb.net) for communication between a remote computer and your server.
- cogier
- Site Admin
- Posts: 1129
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: ssh from gambas on linux
If you are looking to download something from the net then there is the component gb.net.curl.
If you would like an example then have a look at 'Your_Location' on the Farm or available here. It gets information about your location from your IP address.
If you would like an example then have a look at 'Your_Location' on the Farm or available here. It gets information about your location from your IP address.
Re: ssh from gambas on linux
I want to log in, and execute a script.
Re: ssh from gambas on linux
Hi seany,
Login on a server and install Gambas updates is something is do from within a Gambas GUI application on a client.
How did I do this:
1. I wrote a Gambas application that is a socked server command line application (see gb.net) that runs as a root application on a Debian server.
2. I wrote a Gambas application that is a socked client with a gui interface that runs on a Linux Mint client.
This client sends commands to the socked server that are executed by the socket server with root privileges.
I use it for stuff like:
- Install new updates (I push them using rsync between client and server from within the GUI application)
- View logfiles on the server
- Send commands directly to the server (like pstree to see a tree with active processes)
I can't post you the Gambas applications or code as they are at work and copyrighted.
But if you have questions I will gladly answer then.
First study gb.net and sockets and have a good understanding of that
Secondly understand you server side of things, like how to get applications running as a deamon with root privileges.
Login on a server and install Gambas updates is something is do from within a Gambas GUI application on a client.
How did I do this:
1. I wrote a Gambas application that is a socked server command line application (see gb.net) that runs as a root application on a Debian server.
2. I wrote a Gambas application that is a socked client with a gui interface that runs on a Linux Mint client.
This client sends commands to the socked server that are executed by the socket server with root privileges.
I use it for stuff like:
- Install new updates (I push them using rsync between client and server from within the GUI application)
- View logfiles on the server
- Send commands directly to the server (like pstree to see a tree with active processes)
I can't post you the Gambas applications or code as they are at work and copyrighted.
But if you have questions I will gladly answer then.
First study gb.net and sockets and have a good understanding of that
Secondly understand you server side of things, like how to get applications running as a deamon with root privileges.
gbWilly
- Dutch translation for Gambas3
- Gambas wiki content contributer
... there is always a Catch if things go wrong!
- Dutch translation for Gambas3
- Gambas wiki content contributer
... there is always a Catch if things go wrong!