我想通过一个端口(ssh在端口222上)设置对服务器的访问,但即使我在
deploy.rb
中设置了以下内容:
set :application, 'billing'
set :repo_url, 'git@github.com:random/stat.git'
set :keep_releases, 5
set :ssh_options, {
forward_agent: true,
port: 222
}
SSHKit.config.command_map[:rake] = "bundle exec rake" #8
SSHKit.config.command_map[:rails] = "bundle exec rails"
我仍然收到错误信息。
SSHKit::Runner::ExecuteError: Exception while executing on host IP:
Operation timed out - connect(2) for "IP" port 22
我应该如何解决这个错误?是我的做法有问题吗?