I want a easy way to save, copy and edit files on a remote server. I'm using Eclipse as an IDE, what could be better for these tasks than RSE(Remote System Exlporer) plugin for Eclipse. The thing is that I dont know how to make a connection using a public key. I have file that I downloaded from my Amazon account, *.pem. But I don't see any forms or inputs for this, when I try to connect to my remote Linux server. It is just User-id and password. I also tried to open the public key using the system's text editor and copy everything to my password field, but it didn't worked. Pls help me
3 Answers
this was baking my noodle for a while too. you put the keys in a folder not in the RSE config but in the whole of eclipse
check this: http://siteadmin.gforge.inria.fr/eclipse-ssh.html

- 236
- 2
- 2
-
6It was actually quite easy. I figured out that in Preferences->General->Network Connections->SSH2 I only input the location of the public RSA key and in Preferences->General->Remote System you should set your default user-id for SSH, which in Amazon EC2 is ec2-user. – einstein Jan 17 '11 at 12:03
-
1I can connect, but I only have read access. I need to edit files on /var/www and for that I need root access (at least when I'm ssh-ing into the EC2 instance). Amazon won't allow me to connect as root, and ec2-user won't work. I have to connect as 'ubuntu'. Any ideas on how to go around this? – Eric Jan 30 '12 at 03:00
-
The comment by @einstein should be the posted as a solution as that's the correct way of doing things. I have keys generated by PuTTYgen in My Documents. I think they are 2048 biis and work just fine. I edited the preferences to point to that directory and key. Worked just fine. – Hussain Akbar Mar 08 '22 at 10:20
-
Very old thread, but seeing that this is the first hit in Google when searching for this issue. @Eric posted about logging in as root. IMO, that is always the wrong way of doing things. Instead, you should create a user id for yourself and others then either add it to sudoers.d or (the way I like doing things) add developers to a Linux group, e.g. devs and use chgrp and chmod commands to change the group of /var/www/html to dev and grant group users write access. – Hussain Akbar Mar 08 '22 at 10:23
Not mentioned (at least in explicitly) is the fact that RSE (and for what I've seen, Eclipse in general) only seems to work with 1024 bit keys https://bugs.eclipse.org/bugs/show_bug.cgi?id=404714
I also had issues, because my privatekey was 2048, but I added a new key to authorized hosts and then I could connect.

- 962
- 3
- 13
- 26
-
My 3072 bit key generated by `ssh-keygen` did not work. Only 1024 bit key generated by Eclipse GUI worked. – ks1322 Jan 06 '22 at 10:06
I added my local computer's ~/.ssh/id_rsa.pub
to the remote /home/ec2-user/.ssh/authorized_keys
.
Then just set the user to connect in RSE to ec2-user
when connecting.
Someone asked for root
login. It works too: update /root/.ssh/authorized_keys
, and edit /etc/ssh/sshd_config
to allow root login:
#PermitRootLogin forced-commands-only
PubkeyAuthentication yes
Then reload the sshd daemon: service sshd restart

- 1,876
- 1
- 17
- 33