ssh from gambas on linux

Post

Posted
Rating:
#1 (In Topic #345)
Regular
seany is in the usergroup ‘Regular’
 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
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Regular
stevedee is in the usergroup ‘Regular’

seany said

…I wish to ssh to a target server (say, a.b.c.d) from gambas…

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.
Online now: No Back to the top

Post

Posted
Rating:
#3
Avatar
Guru
cogier is in the usergroup ‘Guru’
cogier is in the usergroup ‘GambOS Contributor’
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.
Online now: No Back to the top

Post

Posted
Rating:
#4
Regular
seany is in the usergroup ‘Regular’
I want to log in, and execute a script.
Online now: No Back to the top

Post

Posted
Rating:
#5
Online now: No Back to the top

Post

Posted
Rating:
#6
Avatar
Administrator
gbWilly is in the usergroup ‘unknown’
gbWilly leads the usergroup ‘GambOS Contributor’
gbWilly is in the usergroup ‘Blogger’
 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.

gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories


… there is always a Catch if things go wrong!
Online now: No Back to the top
1 guest and 0 members have just viewed this.