EC2 using Putty SSH: Server refused our key

Hello - I am a newbie setting up my Wowza/Amazon EC2 instance for the first time.

From the WowzaProForAmazonEC2_UsersGuide.pdf, I have gone through the stages of set up, up to the section called “Opening a Telnet Session to an Instance.”

I currently have an Instance that is confirmed by the command > ec2-describe-instances --region us-east-1

From which I got the following public address:

ec2-75-101-181-161.compute-1.amazonaws.com

I have also executed >ec2-authorize --region us-east-1 -p22

Referring to the PDF UserGuide, from putty.exe, enter the public domain name, select SSH and Port 22. In the sidebar, click Connection: SSH: Auth

Then BROWSE for the wowza-keypair-putty.ppk file from the selection box.

Click OPEN to start a new SSH session.

Login prompt:

When I logged in as root, the server returned “Disconnected, No supported authentication methods available. Server refused our key.”

What am I doing wrong??

Did you convert the keypair with puttygen? This the best EC2 getting started guide. See the appendix on using Putty.

I’ve noticed that this step has become unnecessary using ElasticFox, if you create keypair with Elasticfox, and use that keypair to start an instance, then right-click the instance and choose connect to Public DNS name – which opens putty up and logs on, you don’t even have to type “root”

You have to set the path to Putty.exe, click the Toolt icon in Elastic Fox (upper right next to About) and enter full path to Putty.exe in the SSH Command box.

Richard

Toward the upper-right area of ElasticFox, look for a “Tools” icon. Click that. That opens a dialog box. The first box is labeled “SSH Command”. Change that from “C:\program files\putty\Putty.exe” to the full path to Putty.exe, wherever you installed it.

Then it will work: right-click the instance in the Instances Tab, select “Connect to Public DNS Name”, putty will open and connect.

Richard

For FTP you have to add port 21 to your security group, and on the instance you have to start the ftp server:

service vsftpd start

Also, you have to use FTP Active Mode connection in my experience.

Richard

In the Security Tab:

  • Click the default group in the left pane

  • Click the green button in the right pane to add

  • Select “Other” from the dropdown

  • Protocol = TCP/IP

  • Port = 21

  • Host = 0.0.0.0/0

  • Click Add

    Richard

You can change the password, just type “passwd”, but these instances are made for authentication with those keypairs. I tested, I changed the password but wasn’t able to login without the private key.

But you can just use the private key. If someone else needs access you can email the private key to them and it will work.

There is no web server on Wowza EC2 instances.

Richard

Mike,

To connect to Wowza you need a Flash player and use rtmp url.

It’s a good idea at this point to get the Wowza example players so you can test easily. Download and install Wowza Pro 10 (you do not have to run Wowza, this is just to get the examples), then open this page:

[wowza-install-dir]/examples/SimpleVideoStreaming/client/simplevideostreaming.html

This html page load the swf in the same folder, which is what really connects to Wowza.

In the Stream box put rtmp url:

rtmp://174.129.214.73/simplevideostreaming

In the Stream box put:

merry_melodies_falling_hare.flv

You can use http to check the server, put this in a browser.

http://174.129.214.73:1935

Richard

If you already have a web server it be better to put the html and swf files there, but you can do it. If you install apache on the wowza server you can’t use port 80 for Wowza.

Richard

No, it would just be this:

rtmp://174.129.214.73/simplevideostreaming

“simplevideostreaming” is the name of a Wowza application. It is also the name of the html and swf file which go on a web server, the rtmp url is what the swf uses to connect to Wowza.

Richard

The embed source is an http url to the swf.

Richard

I think I mislead this morning, confusing embed with streamer in JW Player.

In any case, html and swf go on the web server and have http urls, and the Flash player connects to Wowza with rtmp url.

Sorry,

Richard

But that’s the Wowza server, not a web server. Right?

swf files go on the web server.

Also, it doesn’t look like Wowza is runnning at that address. Probably you haven’t opened ports on security group. Add tcp 1935, 80, 443 in the default security group. See this post.

Richard

Those are ports, put those in box labeled “Port”, one at a time. Here is a list of ports you might want to add:

TCP Ports

21 (ftp)

22 (ssh)

80 (http)

443 (ssl)

554 (this is for rtsp)

1935 (wowza)

3306 (this is mysql)

8084,8085 (this is for JConsole)

UDP Ports

6970 - 9999 (this is for rtp)

It’s working better now. You just need to add a folder to the Wowza applications:

/home/wowza/applications/simplevideostreaming

Also, the Exremists.m4v is not on the ec2 instance. So use this to test stream

merry_melodies_falling_hare.flv

Richard

Nevermind about about simplevideostreaming folder. I see you have “vod”

This is working now, congrats:

http://xxx.nmatv.com/index.htm

rtmp://174.129.214.73/vod

merry_melodies_falling_hare.flv

Richard

Hi Richard - thanks for the reply…

Did you convert the keypair with puttygen?

yes. The new file is called wowza-keypair-putty.ppk

Re: Elasticfox. Wonder why I need Elasticfox or the command line at all, since I am able to create instances using the AWS EC2 Console?

I installed ElasticFox, created a keypair called elasticfox1.pem, saved it, loaded it, got this as result:

Couldn’t launch: c:\Program Files\Putty\putty.exe

Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIProcess.init]

I then launched putty separately and used the elastic IP to find the server. Got the following error when I tried to login as root:

Unable to use key file “C:\EC2\keys\elasticfox1.pem” (OpenSSH SSH-2 private key)

login as: root

Any thoughts? I have been at this for over a week and I still can’t get it running. Any help would be greatly appreciated.

Thanks

Mike

Progress… I was able to launch an instance from Elasticfox, and then open a connection through putty successfully.

At this point I assume I would have FTP access to the server using port 22. I associated the Instance ID with the Elastic IP address, and tried to FTP into the site using wowza/password (as per page 12 of the WowzaProForAmazonEC2_UsersGuide.pdf)

Using username “wowza”.

Server refused our key.

No supported authentication methods left to try!

:frowning:

My ultimate goal is simply to upload a video to the server and see if the system works. But I have been at it for a week… I think a training video would be good.

Hi Richard - how do you add port 21 to the security group?

From ElasticFox, I tab to Security Groups. I have set “Basic” security as the default. There are a number of options under “Protocol Details”, but no option for FTP. It does allow Allows RDP, SSH and HTTP.

Thanks for your reply.

Mike

Thanks, that worked!

I was able to login via SFTP using “root” and the password “toor”.

I have two questions:

  1. how to I change the root password?

  2. I uploaded a simple index.htm file to the HOME directory, but the file is not appearing when I call it using http://my.ip.12.34/index.htm

Does this mean that I need to install the http server independently?

Thanks.

Mike

Thank you.

Two more questions:

  1. re WowzaMediaServerPro_UsersGuide.pdf, on page 9 -14: how can I tell if Wowza is running as a service on the server right now?

  2. There is a stock FLV file located here: http://174.129.214.73/content/merry_melodies_falling_hare.flv If the server were running, I expect this pathway would return the flash movie. Therefore I will assume the WMP server needs to be started as a SERVICE as noted on page 14 of the PDF.

Thanks again for your kind patience in answering my questions.

Mike