"开放失败:在行政上被禁止:开放失败"在SSH期间

时间:2015-08-06 21:34:10

标签: postgresql ssh

我已经摔跤了3天,但无法弄清楚为什么我会在行政上被禁止'使用此SSH命令。我尝试将我的/ etc / sshd_config更改为PermitTunnel = yes并重新启动SSH,但没有骰子。使用-v标志运行SSH,这是输出。我没有看到任何红旗,我错过了什么?

Running: ssh -v -M -S script/../tmp/rds-tunnel-ctrl-socket -fN -i script/../infrastructure/trueapp.pem -l ec2-user -L 5433:$POSTGRES_HOST:5432 $HOST
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to $HOST port 22.
debug1: Connection established.
debug1: identity file script/../infrastructure/trueapp.pem type -1
debug1: identity file script/../infrastructure/trueapp.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2
debug1: match: OpenSSH_6.2 pat OpenSSH*
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA $HOST_KEY
debug1: Host $POSTGRES_HOST is known and matches the RSA host key.
debug1: Found key in /Users/emily/.ssh/known_hosts:21
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: script/../infrastructure/trueapp.pem
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
Authenticated to $POSTGRES_HOST.
debug1: Local connections to LOCALHOST:5433 forwarded to remote address $HOST:5432
debug1: Local forwarding listening on ::1 port 5433.
bind: Address already in use
debug1: Local forwarding listening on 127.0.0.1 port 5433.
bind: Address already in use
channel_setup_fwd_listener: cannot listen to port: 5433
Could not request local forwarding.
debug1: setting up multiplex master socket
ControlSocket script/../tmp/rds-tunnel-ctrl-socket already exists, disabling multiplexing
debug1: Requesting no-more-sessions@openssh.com
debug1: forking to background
debug1: Entering interactive session.
+ sleep 3
+ RAILS_ENV=production
+ bundle exec rake db:dump
config.eager_load is set to nil. Please update your config/environments/*.rb files accordingly:

  * development - set it to false
  * test - set it to false (unless you use a tool that preloads your test environment)
  * production - set it to true

channel 2: open failed: administratively prohibited: open failed
rake aborted!
PG::ConnectionBad: server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.
/Users/emily/.gem/ruby/2.1.6/gems/activerecord-4.1.9/lib/active_record/connection_adapters/postgresql_adapter.rb:888:in `initialize'
/Users/emily/.gem/ruby/2.1.6/gems/activerecord-4.1.9/lib/active_record/connection_adapters/postgresql_adapter.rb:888:in `new'
/Users/emily/.gem/ruby/2.1.6/gems/activerecord-4.1.9/lib/active_record/connection_adapters/postgresql_adapter.rb:888:in `connect'
/Users/emily/.gem/ruby/2.1.6/gems/activerecord-4.1.9/lib/active_record/connection_adapters/postgresql_adapter.rb:568:in `initialize'
/Users/emily/.gem/ruby/2.1.6/gems/activerecord-4.1.9/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `new'
/Users/emily/.gem/ruby/2.1.6/gems/activerecord-4.1.9/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `postgresql_connection'
/Users/emily/.gem/ruby/2.1.6/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:435:in `new_connection'
/Users/emily/.gem/ruby/2.1.6/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:445:in `checkout_new_connection'
/Users/emily/.gem/ruby/2.1.6/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `acquire_connection'
/Users/emily/.gem/ruby/2.1.6/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:351:in `block in checkout'
/Users/emily/.gem/ruby/2.1.6/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:350:in `checkout'
/Users/emily/.gem/ruby/2.1.6/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in `block in connection'
/Users/emily/.gem/ruby/2.1.6/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in `connection'
/Users/emily/.gem/ruby/2.1.6/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:541:in `retrieve_connection'
/Users/emily/.gem/ruby/2.1.6/gems/activerecord-4.1.9/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
/Users/emily/.gem/ruby/2.1.6/gems/activerecord-4.1.9/lib/active_record/connection_handling.rb:87:in `connection'
/Users/emily/.gem/ruby/2.1.6/gems/apartment-1.0.1/lib/apartment/adapters/postgresql_adapter.rb:73:in `reset'
/Users/emily/.gem/ruby/2.1.6/gems/apartment-1.0.1/lib/apartment/adapters/postgresql_adapter.rb:39:in `initialize'
/Users/emily/.gem/ruby/2.1.6/gems/apartment-1.0.1/lib/apartment/adapters/postgresql_adapter.rb:10:in `new'
/Users/emily/.gem/ruby/2.1.6/gems/apartment-1.0.1/lib/apartment/adapters/postgresql_adapter.rb:10:in `postgresql_adapter'
/Users/emily/.gem/ruby/2.1.6/gems/apartment-1.0.1/lib/apartment/tenant.rb:48:in `adapter'
/Users/emily/.gem/ruby/2.1.6/gems/apartment-1.0.1/lib/apartment/tenant.rb:19:in `init'
/Users/emily/.gem/ruby/2.1.6/gems/apartment-1.0.1/lib/apartment/railtie.rb:31:in `block in <class:Railtie>'
/Users/emily/.gem/ruby/2.1.6/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:438:in `instance_exec'
/Users/emily/.gem/ruby/2.1.6/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:438:in `block in make_lambda'
/Users/emily/.gem/ruby/2.1.6/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:184:in `call'
/Users/emily/.gem/ruby/2.1.6/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:184:in `block in simple'
/Users/emily/.gem/ruby/2.1.6/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:185:in `call'
/Users/emily/.gem/ruby/2.1.6/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:185:in `block in simple'
/Users/emily/.gem/ruby/2.1.6/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:185:in `call'
/Users/emily/.gem/ruby/2.1.6/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:185:in `block in simple'
/Users/emily/.gem/ruby/2.1.6/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:86:in `call'
/Users/emily/.gem/ruby/2.1.6/gems/activesupport-4.1.9/lib/active_support/callbacks.rb:86:in `run_callbacks'
/Users/emily/.gem/ruby/2.1.6/gems/actionpack-4.1.9/lib/action_dispatch/middleware/reloader.rb:83:in `prepare!'
/Users/emily/.gem/ruby/2.1.6/gems/actionpack-4.1.9/lib/action_dispatch/middleware/reloader.rb:55:in `prepare!'
/Users/emily/.gem/ruby/2.1.6/gems/railties-4.1.9/lib/rails/application/finisher.rb:52:in `block in <module:Finisher>'
/Users/emily/.gem/ruby/2.1.6/gems/railties-4.1.9/lib/rails/initializable.rb:30:in `instance_exec'
/Users/emily/.gem/ruby/2.1.6/gems/railties-4.1.9/lib/rails/initializable.rb:30:in `run'
/Users/emily/.gem/ruby/2.1.6/gems/railties-4.1.9/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/emily/.gem/ruby/2.1.6/gems/railties-4.1.9/lib/rails/initializable.rb:54:in `run_initializers'
/Users/emily/.gem/ruby/2.1.6/gems/railties-4.1.9/lib/rails/application.rb:300:in `initialize!'
/Users/emily/.gem/ruby/2.1.6/gems/railties-4.1.9/lib/rails/railtie.rb:194:in `public_send'
/Users/emily/.gem/ruby/2.1.6/gems/railties-4.1.9/lib/rails/railtie.rb:194:in `method_missing'
/Users/emily/Documents/Development/PromptWorks/true-app/config/environment.rb:5:in `<top (required)>'
/Users/emily/.gem/ruby/2.1.6/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in `require'
/Users/emily/.gem/ruby/2.1.6/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in `block in require'
/Users/emily/.gem/ruby/2.1.6/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:232:in `load_dependency'
/Users/emily/.gem/ruby/2.1.6/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in `require'
/Users/emily/.gem/ruby/2.1.6/gems/railties-4.1.9/lib/rails/application.rb:276:in `require_environment!'
/Users/emily/.gem/ruby/2.1.6/gems/railties-4.1.9/lib/rails/application.rb:405:in `block in run_tasks_blocks'

0 个答案:

没有答案