Discussion Forums  >  Self Hosted Control Panels

Replies: 3    Views: 97

Pete_331
Lost but trying
Profile
Posts: 11
Reg: Jul 16, 2014
Perth
5,660
07/21/14 12:10 AM (9 years ago)

Self-hosted Buzztouch Control Panel on Amazon EC2 - Connection Issue

First post... so try and be nice to me... I have been trying to setup a self-hosted Buzztouch Control Panel on Amazon EC2's free tier service. I have been following the brilliant how-to PDF found here: https://www.buzztouch.com/files/howtos/RDs_Updated_EC2_Self-hosting_Guide.pdf The guide was written for use with a mac…. And I have a windows machine. I followed most of the guide but am having some trouble setting up Filezilla to connect to the SFTP. I have opened up the correct ports (SSH 22) on the Amazon AMS. I can connect to the server using the username: ubuntu but not username: root. When connected with ubuntu username I cannot transfer any files. I think this has to do with a part I missed on the guide as I didn’t know what to do. (Below copied from PDF) 1. Open a Terminal (command line interface) and navigate to the directory (folder) where you saved the key pair (.pem file) in the previous section of this “how to” guide. Navigation in the command line involves the “cd” command. The details of where you have to “cd” depend on where you stored the .pem file. 2. When you're in the directory with the .pem file, whose file name I'll represent here with “[your_key_pair_file_name].pem,” run the following command in the Terminal to make sure only you have permission to use this key pair (otherwise, SSH on your instance might reject the key pair): chmod 0600 [your_key_pair_file_name].pem For example, if your key pair file name is mykeypair.pem, the command would be chmod 0600 mykeypair.pem This part I could not do as I’m not sure how to navigate to a file on my local hard drive. I’m assuming this command gives the local machine authority to transfer files? I am using the terminal through Putty and so am connected to my online server when using the terminal. I have tried the following command: cd /D:/folder/folder/ and many others with no success. I am only new to unix commands and have searched but still couldn’t manage to find what I need to go to a file located on my hard drive. The only thing I thought was doing was copying my key pair to the online server and then doing the above command….. but I thought that may have security implications. Any help would be greatly appreciated. Only new to this so sorry if the lingo is sub par. I can’t copy the debug from Filezilla as I am not on my pc but can post later. Really enjoying Buzztouch so far 
 
Pete_331
Lost but trying
Profile
Posts: 11
Reg: Jul 16, 2014
Perth
5,660
like
07/21/14 04:48 AM (9 years ago)
Here is the debug from Filezilla if anyone wants to have a read. Thanks The issue here is: Server sent command exit status 0 this happens when I log in as root, connects fine when I use ubuntu (but I cant write files-even in www directory).... 2014-07-21 19:48:24 8664 1 Status: Connecting to ec2-54-xxx-xxx-xxx.compute-1.amazonaws.com... 2014-07-21 19:48:24 8664 1 Trace: Going to execute "C:\Program Files (x86)\FileZilla FTP Client\fzsftp.exe" 2014-07-21 19:48:24 8664 1 Response: fzSftp started 2014-07-21 19:48:24 8664 1 Trace: CSftpControlSocket::ConnectParseResponse(fzSftp started) 2014-07-21 19:48:24 8664 1 Trace: CSftpControlSocket::SendNextCommand() 2014-07-21 19:48:24 8664 1 Trace: CSftpControlSocket::ConnectSend() 2014-07-21 19:48:24 8664 1 Command: keyfile "E:\Dropbox\xxxxxxxx1.ppk" 2014-07-21 19:48:24 8664 1 Trace: CSftpControlSocket::ConnectParseResponse() 2014-07-21 19:48:24 8664 1 Trace: CSftpControlSocket::SendNextCommand() 2014-07-21 19:48:24 8664 1 Trace: CSftpControlSocket::ConnectSend() 2014-07-21 19:48:24 8664 1 Command: keyfile "E:\Dropbox\xxxxxxxx2.ppk" 2014-07-21 19:48:24 8664 1 Trace: CSftpControlSocket::ConnectParseResponse() 2014-07-21 19:48:24 8664 1 Trace: CSftpControlSocket::SendNextCommand() 2014-07-21 19:48:24 8664 1 Trace: CSftpControlSocket::ConnectSend() 2014-07-21 19:48:24 8664 1 Command: open "ec2-54-xxx-xxx-xxx.compute-1.amazonaws.com" 22 2014-07-21 19:48:24 8664 1 Trace: Looking up host "ec2-54-xxx-xxx-xxx.compute-1.amazonaws.com" 2014-07-21 19:48:24 8664 1 Trace: Connecting to 54.79.84.181 port 22 2014-07-21 19:48:24 8664 1 Trace: Server version: SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 2014-07-21 19:48:24 8664 1 Trace: Using SSH protocol version 2 2014-07-21 19:48:24 8664 1 Trace: We claim version: SSH-2.0-PuTTY_Local:_Jun__1_2014_11:08:49 2014-07-21 19:48:24 8664 1 Trace: Doing Diffie-Hellman group exchange 2014-07-21 19:48:24 8664 1 Trace: Doing Diffie-Hellman key exchange with hash SHA-256 2014-07-21 19:48:25 8664 1 Trace: Host key fingerprint is: 2014-07-21 19:48:25 8664 1 Trace: ssh-rsa 2048 1f:71:e9:c4:59:21:2f:d1:89:b1:c3:4e:32:68:c0:4f 2014-07-21 19:48:25 8664 1 Trace: Initialised AES-256 SDCTR client->server encryption 2014-07-21 19:48:25 8664 1 Trace: Initialised HMAC-SHA-256 client->server MAC algorithm 2014-07-21 19:48:25 8664 1 Trace: Initialised AES-256 SDCTR server->client encryption 2014-07-21 19:48:25 8664 1 Trace: Initialised HMAC-SHA-256 server->client MAC algorithm 2014-07-21 19:48:25 8664 1 Trace: Successfully loaded 2 key pairs from file 2014-07-21 19:48:25 8664 1 Trace: Offered public key from "E:\Dropbox\xxxxxxxx1.ppk" 2014-07-21 19:48:25 8664 1 Trace: Server refused public key 2014-07-21 19:48:25 8664 1 Trace: Offered public key from "E:\Dropbox\xxxxxxxx2.ppk" 2014-07-21 19:48:25 8664 1 Trace: Offer of public key accepted, trying to authenticate using it. 2014-07-21 19:48:25 8664 1 Trace: Access granted 2014-07-21 19:48:25 8664 1 Trace: Remote debug message: Port forwarding disabled. 2014-07-21 19:48:25 8664 1 Trace: Remote debug message: Agent forwarding disabled. 2014-07-21 19:48:25 8664 1 Trace: Remote debug message: X11 forwarding disabled. 2014-07-21 19:48:25 8664 1 Trace: Remote debug message: Forced command. 2014-07-21 19:48:25 8664 1 Trace: Remote debug message: Port forwarding disabled. 2014-07-21 19:48:25 8664 1 Trace: Remote debug message: Agent forwarding disabled. 2014-07-21 19:48:25 8664 1 Trace: Remote debug message: X11 forwarding disabled. 2014-07-21 19:48:25 8664 1 Trace: Remote debug message: Forced command. 2014-07-21 19:48:25 8664 1 Trace: Opened channel for session 2014-07-21 19:48:26 8664 1 Trace: Started a shell/command 2014-07-21 19:48:26 8664 1 Status: Connected to ec2-54-xxx-xxx-xxx.compute-1.amazonaws.com 2014-07-21 19:48:36 8664 1 Trace: Server sent command exit status 0 2014-07-21 19:48:36 8664 1 Trace: Disconnected: All channels closed 2014-07-21 19:48:36 8664 1 Error: Fatal: unable to initialise SFTP on server: could not connect 2014-07-21 19:48:36 8664 1 Trace: CSftpControlSocket::ResetOperation(66) 2014-07-21 19:48:36 8664 1 Trace: CControlSocket::ResetOperation(66) 2014-07-21 19:48:36 8664 1 Error: Could not connect to server
 
Pete_331
Lost but trying
Profile
Posts: 11
Reg: Jul 16, 2014
Perth
5,660
like
07/21/14 07:31 AM (9 years ago)
Okay, so I have found a work around. I have changed the permissions for ubuntu user to write to the www directory. link I found useful: http://stackoverflow.com/questions/7944428/uploading-to-ec2-problems-how-do-you-do-ftp so I used these commands sudo chgrp ubuntu /var/www/ sudo chmod 770 /var/www/ So I am transferring files. Yay! but I still can't login with root user. Maybe I wont even need to....
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
07/21/14 02:58 PM (9 years ago)
cool I have no idea either but good to know!thanks
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.