Skip to content

Instantly share code, notes, and snippets.

@renkin
Created January 4, 2018 16:12
Show Gist options
  • Save renkin/951b89f2357795d3af28a05f304c94e4 to your computer and use it in GitHub Desktop.
Save renkin/951b89f2357795d3af28a05f304c94e4 to your computer and use it in GitHub Desktop.
KeePass URL Overrides for SSH Scheme using MobaXterm
cmd://"C:\Program Files (x86)\Mobatek\MobaXterm\MobaXterm.exe" -newtab "ssh {USERNAME}@{URL:RMVSCM}"
@shahablp
Copy link

@renkin

Yes, it is intented to be used in the KeePass configuration under Tools / Options... / Integration / URL Overrides...

There add a new entry for "ssh" and disable the built-in one.

Then you can use it in your KeyPass entries by entering in the URL field "ssh://example.com" and in the "User name" field your user name.
In the entry list double clicking on the URL or pressing CTRL+U opens MobaXterm for your server.

If you want to use SSH keys I recommend https://keepass.info/plugins.html#keeagent

Thnaks my friend. i used this command :
cmd://mobaxterm.exe -newtab "/bin/ssh {username}@{BASE:RMVSCM}

but before that you should add an environment variable for mobaxterm in windows.

@handgr
Copy link

handgr commented Jan 9, 2020

how can i fill the password within the URL Override

@shahablp
Copy link

@handgr
Copy link

handgr commented Jan 15, 2020

hello,
i already configured keepass2 with almost of the ssh clients , except mobaxterm.

all the conf i tied faild (to fill the password) , have you an URL Override witch work with the password

thanks in advance

@shahablp
Copy link

my friend for using paasword and every thing like that in password url you should use string filekds in keepass : in keepass entry properties/advanced. then you can use them in url override.for example :

  1. add an entry named password . fill it with your own password . then in override url use this string {S:password}.

@softignition
Copy link

Version with port number support may look like this:

cmd://"C:\Program Files (x86)\Mobatek\MobaXterm\MobaXterm.exe" -newtab "ssh {USERNAME}@{URL:HOST} -p {T-REPLACE-RX:/{URL:PORT}/-1/22/}"

@AngelitoMoran
Copy link

You could try with sshpass that is included in MobaXterm:

cmd://"C:\Program Files (x86)\Mobatek\MobaXterm\MobaXterm.exe" -newtab "sshpass -p '{PASSWORD}' ssh {USERNAME}@{IP}"

@naveed1994-ai
Copy link

i want to use mobaxterm with keepass i have tried with above setting. whenever i open my url it will open mobaxterm new session tab

@jonathan409
Copy link

Hi everyone!

I'm trying to use keepass for starting a ssh session from KeePass to MobaXterm. But, as some of you have commented I canot enter password automatically.

I use this Override URL structure:

cmd://"c:\program files (x86)\mobatek\mobaxterm\mobaxterm.exe" -newtab "ssh {USER}@{S:IP}" in my entry and I get this:

root@192.168.8.1's password:

How can I enter password automatically?

I've tried some variants of Override URL structure, like

cmd://"c:\program files (x86)\mobatek\mobaxterm\mobaxterm.exe" -newtab "ssh root@{S:IP}" DELAY{100} {DELAY 1000}{PASSWORD}{ENTER}

But it's not possible.

Thank you for reading!

@jonathan409
Copy link

I think I just did it!

I used this structure:

cmd://"c:\program files (x86)\mobatek\mobaxterm\mobaxterm.exe" -newtab "sshpass -p '{PASSWORD}' ssh {USERNAME}@{S:IP}"

I don't really understand the structure, but I could login.

The only thing is that I recieved this message:

X11 forwarding request failed on channel 0

I hope someone can use this.

Thanks!

P.D.

I use information from Paul reading this discussion:

https://sourceforge.net/p/keepass/discussion/329220/thread/d9b7547c22/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment