Google Compute Engine LAMP堆栈SFTP,SQL和HTTPS [英] Google Compute Engine LAMP Stack SFTP,SQL and HTTPS

查看:65
本文介绍了Google Compute Engine LAMP堆栈SFTP,SQL和HTTPS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了一个谷歌计算虚拟机,并且可以访问phpmyadmin和默认索引页面.当我单击网站上的按钮时,SSH起作用.

I've setup a google compute VM, and can access phpmyadmin and the default index page. SSH works when I click the button on the website.

我无法远程连接到服务器实例以进行任何类型的管理(ftp或sql)

I am having issues remotly connecting to my server instance for any sort of management(ftp or sql)

我在这里遵循防火墙部分: https://cloud.google.com/solutions/mysql-remote-access

I followed the firewall section here: https://cloud.google.com/solutions/mysql-remote-access

但是我仍然无法连接.

我的防火墙已配置:

我不知道如何使HTTPS正常工作,但是将来当我将站点完全切换到计算引擎时,要解决这个问题可能会成为一个问题.由于我还不能切换我的域或当前的SSL证书.

And I have no idea how to get HTTPS working, But it can be a problem to take care of in the future when I fully switch my site over the compute engine. Since I can't switch my domain or current SSL certificates over yet.

详细信息:

当我尝试使用客户端"Sequel Pro"连接到SQL时,它将返回:

When I try to connect to SQL using client "Sequel Pro" it returns:

使用telnet:

With telnet:

当我尝试连接到SFTP时,我得到:

When I try connect to SFTP I get:

这可能是由于我误输入密码引起的吗?

Could this be caused by me mistyping the password?

推荐答案

您的防火墙设置显示,对于TCP协议,您允许到端口21和3306的外部流量.这很好,但还不够.

Your firewall settings show that you allowed external traffic to both ports 21 and 3306 for TCP protocol. This is good but not enough.

为了允许与MySQL的远程连接,您需要授予对用户名和外部IP地址的远程访问.以这种情况为例. 文章Configure MySQL server on my-server部分的step 6 and step 7中也提到了这一点.您指定了:

In order to allow remote connections to MySQL, you will need to grant remote access to your username and your external IP address. Take a look at this case for an example. This is also mentioned in step 6 and step 7 of Configure MySQL server on my-server section of the article you specified:

mysql> GRANT ALL PRIVILEGES ON *.* TO 'TESTUSER'@'<external-ip-my-client>' IDENTIFIED BY '<some-password>';

关于ftp服务器,VM实例未安装ftp服务,但是您可以使用SFTP协议连接到该实例,该协议比FTP协议更安全,强烈建议使用.使用gcloud compute config-ssh生成SFTP/SSH密钥对.有关更多信息,请访问设置安全的FTP在Google Compute Engine上 artcile.

About the ftp server, the VM instance comes with no ftp service installed, but instead you can use SFTP protocol to connect to it which is more secure than FTP protocol and is highly recommended. Use gcloud compute config-ssh to generate SFTP/SSH key pair. For more information visit Setting up secure FTP on Google Compute Engine artcile.

这篇关于Google Compute Engine LAMP堆栈SFTP,SQL和HTTPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆