How to connect eclipse from local to server - eclipse

I have a eclipse on windows 7 system and I am trying some code on it.
But as my database is on server that is not my local systems so how can I connect eclipse to remote server so that I can write code on local and run on server.
Is it possible then please let me know and that server to which I want to connect that is Linux server.

Do you have to run your program remotely just because your database resides on the other server? Most databases allow connecting over TCP/IP.
Otherwise my suggestion is to add you public ssh key on the server, and then create a script which copies your class files and then executes your java program on your server, such as:
scp -r classfolder remoteuser#remotesystem:folderpath
ssh remoteuser#remotesystem java -cp folderpath the.created.Program
The public key removes the need for you to enter your password for each command.

Related

VSCode SFTP deploy files from remote SSH server to a second remote SSH server

I have two remote SSH servers, server A (dev) and server B (production). When working on files on server A via SSH in VSCode, I want to be able to upload / sync files to server B using the SFTP plugin.
I can see how this is done when working on a local file system and then deploying via SFTP to a single remote SSH server, but I want to know if it's possible to deploy from one remote SSH server to another.
Any help greatly appreciated.

VB Code - Multiple Remote SSH connections to same server

Is it possible to connect several users via openSSH to the same VM so that everyone can access VB Code on the same VM machine and run scripts? thrue the local VB Code
If so, how do I do this?

In Netbeans, can you do SSH connection for PHP Projects?

Netbean is great and I use it with FTP remote connection all the time. However, one of my client currently only have a SSH connection. Is there anyway to connect to it and up/down files?
Like it was mentioned, SFTP is supported in Netbeans by default.
So select "remote connection" in your project's run configuration and use your SSH connection information (host, login and pass). You don't have to provide any private key file.
I've had luck using sshfs (ssh file system) on ubuntu. I create created a mount folder in my home folder and run the following
$ sshfs domain\\user#server:/path/to/remote/folder ~/mount/local-mount-point
From there I start a new (or existing) project in Netbeans at that local folder ~/mount/local-mount-point
For a nicer set up, do a key exchange between your local box and the server (ssh-copy-id) for password-less ssh connections. Then, put the above command line in your .bashrc file.
I do the same as Richard.
In general is easier just to mount the remote filesystem and use netbeans in the mounted directory.
I just do the following :
sudo sshfs -o allow_other root#www.khosmos.com:/var/www/html /mnt/droplet/

Restart PostgreSQL Remotely

Can I remotely restart a PostgreSQL server throught PGAdmin ? The user I currently is the administrative privileges.
Regards,
Dino
I don't think there is such possibility. At best you can reload connected PostgreSQL server using pg_reload_conf() function:
pg_reload_conf sends a SIGHUP signal
to the server, causing configuration
files to be reloaded by all server
processes.
Command:
SELECT pg_reload_conf();
You can also install adminpack contrib module and reload server using Tools menu.
EDIT:
According to pgAdmin documentation:
If pgAdmin is running on a Windows
machine, it can control the postmaster
service if you have enough access
rights. Enter the name of the service.
In case of a remote server, it must be
prepended by the machine name (e.g.
PSE1\pgsql-8.0). pgAdmin will
automatically discover services
running on your local machine.
If pgAdmin is running on a Unix
machine, it can control processes
running on the local machine if you
have enough access rights. Enter a
full path and needed options to access
the pg_ctl program. When executing
service control functions, pgAdmin
will append status/start/stop keywords
to this. Example: sudo
/usr/local/pgsql/bin/pg_ctl -D
/data/pgsql
You can try use Start Service/Stop Service options (in Tools menu) to restart remote server.

Problems using teamcity command line to perform ssh remote login

I was wondering if anyone has tried using teamcity's command line builder to perform ssh remote login.
Right now, I would like to automate some testing on a QNX neutrino OS which is currently unsupported by teamcity. As a work around, I setup a ssh server on the target qnx machine so i could ssh and sftp the executables in.
Firstly, the source are compiled on Windows XP using qnx's compiler (based on g++). Followed by sftp-ing the executables into qnx neutrino.
Next, using ssh, script the login to remotely start the test apps and send the results back to the remote agent for publishing.
The batch script I created works well standalone, however, after hooking it up on the remote agent, it fails to login ssh and hangs indefinitely at the following command:
ssh -l "./.sh"
Notes:
I have added the remote agent's RSA public key in the QNX .ssh/authorized keys file, automatic login is working.
Is there a need to add the teamcity server's RSA public key in too?
Anyone has any idea on this problem?
I had a few weird problems with key-based SSH logins on QNX related to file permissions for the keys in .ssh. and permissions of parent folders (/home/username and /root).
Add
LogLevel DEBUG3
to /etc/openssh/sshd_config, make sure syslog is configured and is logging sshd output, restart sshd and try again - it will most likely complain about something.
Also, ssh -l "./.sh" makes no sense - -l is used to specify the user name, something is off there.