如何摆脱 运行 bundle exec foreman start 上的 Permission denied (publickey) 错误?
How to get rid of Permission denied (publickey) error on running bundle exec foreman start?
每当我 运行 bundle exec foreman start
我都低于错误。
之前还好好的,突然就不行了
Procfile
web: bundle exec rails s -p 3000
redis: redis-server --port 6379
db: /usr/local/bin/mysqld --gdb
watch_re: npm run watch:js:re
watch_vue: npm run watch:js:vue
sidekiq: bundle exec sidekiq -q high -q default -q crawler_facebook -q
crawler_twitter -q mckinley -q twitter_io -q twitter_reach_freq -q
master_update -q twitter_check_notification -q tw_report_file_creator
-q mojaco_tw_crawler -q mojaco_fb_crawler -q fb_report_file_creator -q cache_manager -q facebook_attribution
ssh_tunneling_for_elasticache: ssh -N -L
60660:sherpa-production.y6mej4.0001.apne1.cache.amazonaws.com:60660
ec2-user@ec2-13-114-37-187.ap-northeast-1.compute.amazonaws.com -o
"StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null"
AWS 服务器不知道您的 public SSH 密钥。
ssh_tunneling_for_elasticache: ssh -N -L 60660:sherpa-production.y6mej4.0001.apne1.cache.amazonaws.com:60660 ec2-user@ec2-13-114-37-187.ap-northeast-1.compute.amazonaws.com -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null"
此命令尝试建立到 AWS 的隧道连接。
如果您可以通过命令行访问它,这里是如何使用您的 public 密钥设置服务器:
如果您还没有生成您的密钥(在您的本地设备上):
ssh-keygen
将密钥粘贴到服务器授权密钥文件~/.ssh/authorized_keys
考虑到您只能通过 Web 控制台访问 AWS,请按照 here 所述执行以下操作:
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
Select your instance. In the Description tab, verify the value of Key
pair name.
If you did not specify a key pair when you launched the instance, you
can terminate the instance and launch a new instance, ensuring that
you specify a key pair. If this is an instance that you have been
using but you no longer have the .pem file for your key pair, you can
replace the key pair with a new one. For more information, see
Connecting to Your Linux Instance if You Lose Your Private Key.
每当我 运行 bundle exec foreman start
我都低于错误。
之前还好好的,突然就不行了
Procfile
web: bundle exec rails s -p 3000
redis: redis-server --port 6379
db: /usr/local/bin/mysqld --gdb
watch_re: npm run watch:js:re
watch_vue: npm run watch:js:vue
sidekiq: bundle exec sidekiq -q high -q default -q crawler_facebook -q crawler_twitter -q mckinley -q twitter_io -q twitter_reach_freq -q master_update -q twitter_check_notification -q tw_report_file_creator -q mojaco_tw_crawler -q mojaco_fb_crawler -q fb_report_file_creator -q cache_manager -q facebook_attribution
ssh_tunneling_for_elasticache: ssh -N -L 60660:sherpa-production.y6mej4.0001.apne1.cache.amazonaws.com:60660 ec2-user@ec2-13-114-37-187.ap-northeast-1.compute.amazonaws.com -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null"
AWS 服务器不知道您的 public SSH 密钥。
ssh_tunneling_for_elasticache: ssh -N -L 60660:sherpa-production.y6mej4.0001.apne1.cache.amazonaws.com:60660 ec2-user@ec2-13-114-37-187.ap-northeast-1.compute.amazonaws.com -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null"
此命令尝试建立到 AWS 的隧道连接。 如果您可以通过命令行访问它,这里是如何使用您的 public 密钥设置服务器:
如果您还没有生成您的密钥(在您的本地设备上):
ssh-keygen
将密钥粘贴到服务器授权密钥文件
~/.ssh/authorized_keys
考虑到您只能通过 Web 控制台访问 AWS,请按照 here 所述执行以下操作:
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
Select your instance. In the Description tab, verify the value of Key pair name.
If you did not specify a key pair when you launched the instance, you can terminate the instance and launch a new instance, ensuring that you specify a key pair. If this is an instance that you have been using but you no longer have the .pem file for your key pair, you can replace the key pair with a new one. For more information, see Connecting to Your Linux Instance if You Lose Your Private Key.