Unable to connect to SSH server with cloud 9 - cloud9-ide

I've got a digital ocean VPS which I'd like to connect to with Cloud 9's code editor. They have a simple form, which I filled out with the fill out with the required information:
hostname: xxx.xxx.xx.xx
username: stephen
nodejs binary path: /usr/bin/nodejs
Your SSH key: mYpUbLicKey...uploaded through cloud 9's interface
initial path: (optional--I've left blank)
port: (optional--I've left blank)
I get the following error:
Cloud9 couldn't connect to SSH server stephen#xxx.xxx.xx.xx
It's on the default port and allows access to the stephen user (although I tried the above with "root" user and still no dice). Is there something I'm missing here? I tried the exact same commands on the Secure Shell chrome app and I'm able to access the server just fine.
Also I was able to get this to work doing, I believe the exact same thing, but then I realized that I should probably not be doing everything using the root user (I'm a little new at this) so I created the stephen user and changed the information in order to use that user instead. That's when it stopped working. Is it possible that I've given inadvertedly denied access to cloud9 by adding this additional user.
I should also add that I've followed the instructions in cloud9's documentation edited the authorized keys on the server to include the public key that's stored on cloud9.
Any ideas? I know it might be difficult to know what the problem is here, but if someone had an idea at least about where to look, I'd really appreciate it. Thanks.

Could it be that you didn't add the ssh key to ~/.ssh/authorized_keys in the homedir of the stephen user?

Had this same issue even after following the instructions on the documentation. Make sure you're allowing SSH from 0.0.0.0/0 onto port 22 for the EC2 instance.

Related

FTP users created in cPanel cannot log in

I feel like an absolute numpty asking this question, but I've struggled with it for literally years and I still have no idea what the answer is.
Basically I have never been able to log in with a new user that I've created in cPanel > FTP Accounts. This is consistent across several different domains and several different hosts, so presumably the issue is me.
Only I just go ahead and add a new user, then try and log in with the given information:
Host: ftp.domain.com
User: account#domain.com
Port: 21
Protocol: FTP
Encryption: Use explicit FTP over TLS if available
I've tried using SFTP; using plain FTP; using Filezilla, CoreFTP and Dreamweaver; setting the start folder as /public_html and /account; downloading and importing the config files that cPanel generates.
I have never had this work for me, not even once. Usually I just end up using the default FTP account, which is why I've never found an answer to this issue.
The errors are always along the lines of:
Connection attempt failed with "EAI_NONAME - Neither nodename nor servname provided, or not known"
No such host is known
Host does not exist
I have searched extensively on this topic, both today and in the past and never found any solution that works.
Can anyone spot WTH I'm doing wrong?
According to the error you are getting it is an issue with hostname. When setting up account with WHM ftp.domain.com DNS record might not have been created. So from cPanel > Advanced Zone Editor check if you have ftp.domain.com has A record of your server or not if not add ftp.domain.com to your DNS.
Sometimes Encryption can also cause issue but not the one you have described. So try the following:
Host: domain.com
User: account#domain.com
Port: 21
Protocol: FTP
Encryption: Only use plain FTP (insecure)

SSH-ing to Google Compute Engine instance through Mac OS X terminal

I have created an instance on Google Compute Engine, but I can't seem to SSH using the terminal. The command that I used was :
gcloud compute ssh example-instance
The error that I got was:
ERROR: (gcloud.compute.ssh) Could not SSH to the instance. It is possible that your SSH key has not propagated to the instance yet. Try running this command again. If you still cannot connect, verify that the firewall and instance are set to accept ssh traffic.
When I googled the error, I was led to this link:Unable to SSH to Google Cloud
I went and checked the firewall rules here https://cloud.google.com/compute/docs/troubleshooting#ssherrors and things seem fine. I also went onto ~/.ssh and checked for google_compute_engine and google_compute_engine.pub which indicate the presence of my private and public key. I was wondering what I should do next? Is this is a problem specific to Mac workstations?
Any help would be really appreciated.
Personally, had some trouble getting my ssh keys setup correctly by following the Google Cloud Engine docs. Found another logical solution...
This didn't take long and solved the problem (i.e., simple ssh access to Google Cloud VM via MacOS Terminal)...
Follow these simple instructions provided by nixCraft:
https://www.cyberciti.biz/faq/google-cloud-compute-engin-ssh-into-an-instance-from-linux-unix-appleosx/
Here are a few other things to check:
Can you ssh into that instance from a browser, using the "SSH" button in the Cloud Console?
If not, try a newly created instance using default settings and compare how your example-instance differs.
Run gcloud config list and confirm that the values for project, account, region, and zone match your expectations.

Set up an instance on AWS-Amazon but cannot connect

I am fairly new at EC2 technology so I think I am missing some points. So I set up an instance which is running and had created two key pairs. I choose the instance, choose "Connect" and the site gives me instructions about that. I follow them and when I execute the ssh command returns that "network is unreachable". Can you help me please?
Okay a few things to check:
Make sure you have the correct ports on your security group open to either your personal IP or to the world, depending on your security requirements. For example: Port Range 22, IP 0.0.0.0/0 (World) xx.xx.xx.xx/32 (personal IP)
Next I would make sure you are executing the command correctly.If 1 does not work can you post the command?
Another thing to check, although based off your error this probably isn't it, is that your have the proper permissions on your private key. chmod 600 mykey
If you're using Amazon Linux the username is ec2-user, which you can then run sudo from.

how to use ftp on amazon aws

Today is my second day of trying to use amazon and i have started to pull my hairs. I want to set up ftp with amazon. I have signed up with them and and created an instance with amazon EC2. I have downloaded the key and I am able to login with ssh using the through Terminal in my mac. I can create files in the instance through terminal.
The instance is something like following:
Public DNS: ec2-xx-xx-xxx-xxx.compute-1.amazonaws.com
I have created a index.html file at this location via terminal. But I am not able to view it in the browser using following url:
ec2-xx-xx-xxx-xxx.compute-1.amazonaws.com/index.html
I just want to create web services here which I will be using in iPhone.
Also I am not sure how to go forward. How will I get to my local files and upload them to server. In other ftps I could do it using lcd, get, put etc but these commands are not working here. can some one please help me how should I go ahead because at this moment I am just banging my head to wall. Someone please help me.
Thanks
Pankaj
Use scp to copy files over ssh:
scp -i key-pair-file file-to-upload ec2-user#instance-public-DNS:
Notice the colon at the end!
With plain EC2 instances, you also need to install some sort of Web server software to power your Web service, and open the HTTP port in the firewall.
Just in case you plan to write your Web service in Java, I have put together a series of articles (Part I, Part II, Part III) guiding through the basics of installing Apache Tomcat on an Amazon Linux EC2 instance.
EDIT 2014/11/20
Dmitry Leskov is actually the better one. You should use his approach.
Answer from 2012
You first have to setup a LAMP (Linux, Apache, mySQL, PHP) stack on your EC2 instance to run any kind of web service.
This means you have to go trough the following steps:
Create an EC2 instance
Setup EBS Storage for mySQL data
Install mySQL
Configure mySQL
Install Apache
Configure Apache
Install PHP
Configure PHP
If you need a detailed instruction, I'd recommend you to take a look at this: Building EC2 with LAMP.
To transfer files to your EC2 instance you can use any FTP client, which supports SFTP and key pairs (you can also enable PasswordAuthentication for SSH to login with credentials). I'm using Transmit with no problems.
On a related note, I encountered a strange problem where I could not FTP from a PHP script running under apache - but I could if I ran the PHP script as root from the command line. After a day of googling, I found this, which solved the problem.
Disable SELinux. (Security Enhanced Linux)
The temporary solution is:
echo 0 >/selinux/enforce
..which will prove the concept, but will not survive a reboot. There are plenty of resources out there that describe how to permanently disable SELinux.

Amazon AWS EC2 SSH Login Through Putty on Windows

Ok, so I've read the tutorial here:
http://www.powercram.com/2009/07/connecting-to-aws-ec2-instance-linux.html
I created a keypair on Ec2, and ran it through puttygen, and tried to login via putty. I tried logging into the ip of the site, the url of the site, and the public DNS given to me by Amazon. I've tried logging in as root, ec2-user, ubuntu (even though I think its a fedora install, I'm just not sure because I just inherited this project). The name of the keypair on amazon's interface is hooper, so I tried logging in as that. Every time I get "server refused our key". I've read many peoples post on this problem, and none of the solutions seem to work for me. If any one has any other ideas, I'd appreciate it.
Make sure the instance is running under the keypair you think it is - you have to ensure the key PEM file you ran through PuttyGEN is the actual key that the instance is authenticated with.

Resources