Open reneski opened 9 years ago
have you tried adding the port to the address? like so 127.0.0.1:2222
yes i did. output looks like this:
[root@naemon ~]# okconfig install linux-test --ssh --user root --host=192.168.0.100:22333 --verbose --interactive --debug
Password:
Install script on linux-test failed with exit_status 128
Output:
Exception occured while running install_okagent
Errors:
Cannot reach remote_host on port 22, aborting...
Script output:
Exception occured while running install_okagent
Install script on 192.168.0.100:22333 failed with exit_status 128
Output:
Exception occured while running install_okagent
Errors:
Cannot reach remote_host on port 22, aborting...
Script output:
Exception occured while running install_okagent
nano /usr/lib/python2.6/site-packages/okconfig/init.py
change: ssh.connect(remote_host, username=username, password=password) to: ssh.connect(remote_host, port=22333, username=username, password=password)
I came across this when trying todo the same myself.
okconfig uses paramiko python package - which allows you to specify the actual port on the connect function - however okconfig omits the ability to do this - You could go one step further and add it as an option... so you can pass via the command line
/usr/lib/python2.6/site-packages/paramiko/client.py
def connect(self, hostname, port=port, username=None, password=None, pkey=None, key_filename=None, timeout=None, allow_agent=True, look_for_keys=True):
i'm trying to use the okconfig ssh install script to setup the linux clients. for the ssh connections i mostly use different ports than the default port 22.
would it be possible to add an option to set a different port?