Hi all,
I'm just getting started with ansible and have a need to run my
client's ssh daemon on a different port (let's say 222). I tried this
against master and integration branches. It looked like i could just
edit lib/ansible/constants.py and set "DEFAULT_REMOTE_PORT = 222",
but, when i do that, i end up with the following stacktrace (when it's
set to 22 it works fine):
client_system | FAILED => Traceback (most recent call last):
File "/ansible/ansible/lib/ansible/runner.py", line 534, in _executor
(host, ok, data, err) = self._executor_internal(host)
File "/ansible/ansible/lib/ansible/runner.py", line 573, in _executor_internal
result = self._execute_normal_module(conn, host, tmp, module_name)
File "/ansible/ansible/lib/ansible/runner.py", line 346, in
_execute_normal_module
module = self._transfer_module(conn, tmp, module_name)
File "/ansible/ansible/lib/ansible/runner.py", line 197, in _transfer_module
outpath = self._copy_module(conn, tmp, module)
File "/ansible/ansible/lib/ansible/runner.py", line 643, in _copy_module
conn.put_file(in_path, out_path)
File "/ansible/ansible/lib/ansible/connection.py", line 161, in put_file
sftp = self.ssh.open_sftp()
File "/usr/lib/python2.6/site-packages/paramiko/client.py", line
399, in open_sftp
return self._transport.open_sftp_client()
File "/usr/lib/python2.6/site-packages/paramiko/transport.py", line
828, in open_sftp_client
return SFTPClient.from_transport(self)
File "/usr/lib/python2.6/site-packages/paramiko/sftp_client.py",
line 105, in from_transport
chan.invoke_subsystem('sftp')
File "/usr/lib/python2.6/site-packages/paramiko/channel.py", line
240, in invoke_subsystem
self._wait_for_event()
File "/usr/lib/python2.6/site-packages/paramiko/channel.py", line
1084, in _wait_for_event
raise e
SSHException: Channel closed.
The other thing I ran across is that I seem to need to be running an
ssh-agent even if I'm using passwordless keys... if I'm not using an
agent, I get the following:
client_system | FAILED => FAILED: Private key file is encrypted
Is that expected? I guess maybe paramiko is expecting to find an
agent with a set of keys added that it can try for authentication? It
would be nice if I could specify a static key to use somehow (i.e.
/root/.ssh/ansible) and have paramiko connect with that instead of
requiring an agent...
thanks!
matt