Is there an Eclipse plugin that can replace the use of external tools such as Putty and WinScp - eclipse

Every time I want to run my project on the remote server, I need to export it from Eclipse as a jar file, to transfer the file from my local machine to the remote server using WinSCP and then to use Putty to run it on the remote server. I am wondering is there a more suitable way of handling this, e.g. an Eclipse plugin that allows me to perform this straight from Eclipse.

This functionality is present in Eclipse, called Remote Systems Explorer.
Open the Remote Systems view by going to Window -> Show View -> Other....
Then right click in this view and select on New connection....
Select SSH Only as remote system type and click Next.
Fill in the necessary information such as hostname and connection name and click Finish.
Select the Connector node you just created from the Remote Systems view and choose Connect.... Enter your credentials and press Ok.
If you managed to log in, you will see a green arrow on the node indicating you are connected.
You can right click either Shells or Terminals and choose Launch Shell/Terminal. A new Remote Shell or Terminal should appear where you can type in commands.
It is also possible to remotely create files, open/edit and save them from within Eclipse.
More documentation can be found in the Eclipse RSE manual.

Related

Mutliple SSH connections inside Visual Studio Code

Is it possible that I can use multiple SSH connections inside Visual Studio Code? I have created 8 different SSH Targets. I think a good solution could be that inside the same window I only have to switch the terminal from one target to the next target.
Also, I have created a workspace. code-workspace file in which I have opened different network drives together as one workspace. The point is if I open one SSH target it would be opened inside a new window and if not, the workspace gets closed. Is it possible to combine both solutions?
Thanks in advance and kind regards
The remote SSH capability added to VSCode (and documented here) is only valid for one remote SSH connection at a time (seen in the lower-left corner)
If you want to develop locally, but still have multiple terminals, each one with their own SSH connection, you would need to:
declare multiple terminals
configure them to launch their own ssh command when starting their session (using terminal.integrated.shellArgs.<OS>": )

No "open folder in container" or any other command in remote-containers vs code

I'm using a remote machine, and want to run a docker inside that machine (local->remote->docker) and wish to use the Remote development in Containers tools of vs code
Unfortunatlly, I do not see any of the actions after installing the extension.
My view (ctrl+shift+p -> type remote-containers)
While the tutorial has actions I don't even see:
You need to make sure you are not connected to your remote host via Remote-SSH in VSCode. If you are, you will not see "Open Folder in Container..." or the other options.
Try opening up VSCode without connecting using Remote-SSH. You will find that the option is now present.
To set up a remote Docker host, you first need to be able to access your remote host using key based authentication as describe here
You then set
"docker.host":"ssh://your-remote-user#your-remote-machine-fqdn-or-ip-here"
in setting.json.
Once that is setup, you can only attach to running containers. Test this out before proceeding:
Start a container on the remote host
Hit F1 in your vscode and then select "Attach to Running Container..."
You should see the container you started and you should be able to attach to this
Once you are past this point, you will need to create your devcontainer.json file as per the documentation
Make sure you have installed Remote Container extension.
and ssh as mentioned on the comment above.
Once installed, click on Docker icon, under containers, right click on the container you need to work with vcode and select attach vscode.
I had this issue when I opened vscode for the first time in a year after only needing to install it for some random project that wanted me to use "dev containers" for, I don't remember what.
But I don't care about dev containers anymore and I don't remember that project, however, vscode was functionally unusable because it opened in that old project directory and was trying to do... something with containers. I don't know, I don't care, I just wanted to open another folder so a junior programmer could use an IDE on my machine they're familiar with instead of emacs/vim/whatever.
The solution for me was to use the "extensions" tab CTRL+SHIFT+X, disable the "Dev Containers" extension, then use "File -> Open Recent Folder" to select some other directory. This gets around the "can't open in container" bug. If you don't have a history of other opened directories, I think you need to completely reinstall Vscode or something.

SFTP connection from Eclipse to Google Cloud Instance

I am struggling to connect my Eclipse Remote environment to my Google cloud Instance.
I have generated a public and private key with ssh-keygen on my mac and stored them in the ~/.ssh folder. I copied the public key to the google cloud using the metadata and added the key to the ssh keys listed. I also added the private key to eclipse in the SSH2 settings. Trying to connect give me error: Failed to connect sshd on " my ip-address".
The strange thing is that Filezilla can connect in this way, but `i would like the comfort from Eclipse. Can somebody help me with this problem??
If you were able to access by sftp with Filezilla that means that your ssh-keys are correct, I recommend you put the ssh-key in the metadata section of the instance, here is the link with the steps.
To connect with eclipse:
Try the Remote System Explorer (RSE). It's a set of plug-ins to do exactly what you are looking for.
RSE may already be included in your current Eclipse installation. To check in Eclipse Indigo go to Window > Open Perspective > Other... and choose Remote System Explorer from the Open Perspective dialog to open the RSE perspective.
To create an SSH remote project from the RSE perspective in Eclipse:
Define a new connection and choose SSH Only from the Select Remote
System Type screen in the New Connection dialog.
Enter the connection information then choose Finish.
Connect to the new host. (Assumes SSH keys are already set up.)
Once connected, drill down into the host's Sftp Files, choose a
folder and select Create Remote Project from the item's context
menu. (Wait as the remote project is created.)
If done correctly, there should now be a new remote project accessible from the Project Explorer and other perspectives within eclipse. With the SSH connection set-up correctly passwords can be made an optional part of the normal SSH authentication process. A remote project with Eclipse via SSH is now created.

Howto connect eclipse RSE to google-compute-engine

I can't get my Eclipse 3.8 (Ubuntu installation), RSE/TM plugin 3.4 or 3.5 connect with google-compute-engine/debian-7-wheezy-v20140606. I have tried to use vm IP directly and also alias method that gcloud compute command line utility provides. Both work from command line but RSE ends up authentication error. It seems that RSE ignores ~/.ssh/config that alias method uses.
Do anyone know what settings/procedure should I use for this connection?
I found how to make settings.
Supposing that your connection name is GCE-1:
Open Remote System Explorer perspective.
Select GCE-1 from Remote System Explorer window.
Right click -> Properties.
Select Host at the left panel of "Properties for GCE-1" window.
Click Configure proxy settings at the Host panel of "Properties for GCE-1" window.
Navigate General -> Network Connection -> SSH2.
Select General tab.
Click Add Private Key button.
Navigate to ~/.ssh.
Select google_compute_engine and click OK and OK.
Note that GCE command line tools create this file by default.
Done! Now you can navigate e.g. your Sftp Files below GCE-1 Within Remote Systems window.

eclipse, remote systems explorer, custom commands

I'm on windows machine and using Eclipse to edit some files on UNIX remote. I use Remote System Explorer to browse files over SSH which works superb (comparing with N++ explorer it's a rocket). Now the UNIX files are under ClearCase versioning and I'd like to have some "right click" options in Eclipse's Remote System Explorer, associated with some unix commands (in my case will be ClearCase commands).
Should I start learning to make a simple plugin for this?
Note: There are some ClearCase readily available plugins but all of them requires ClearCase client to be installed on windows machine (which I did) but our admins doesn't allow the windows clients to access version database for security purposes :)
So now I use putty console (Eclipse console) to check in/out files then edit them with Eclipse. Any chance to do'it once like I explain above?
Thanks in advance,
No plugin possible, because ClearCase commands through an Eclipse plugin would be executed on your local machine, and not in the ssh session.
Those cleartool commands (checkout/checkin) must be executed where the view is started (ie on the unix remote server, where the ssh session is)