cyd01 / KiTTY

:computer: KiTTY, a free telnet/ssh client for Windows
https://www.9bis.com/kitty
Other
1.61k stars 136 forks source link

KiTTY to SSH Jump Server and Execute Command #438

Open waukeerules opened 1 year ago

waukeerules commented 1 year ago

Just curious if anyone has a solution/workaround.

I am wanting to use KiTTY to SSH "proxy" to a Linux jump host and then execute an SSH equivalent CLI command that will result in logging into my true target. I'd like to be able to easily switch between saved SSH session profiles (different jump servers basically or just a standard SSH local login) where the only variable at play is the hostname/IP address being used to launch the KiTTY application.

I've tried using the following (Connection > Proxy) local proxy command via klink: klink -agent %user@%proxyhost -no-antispoof -t "pam %host" Note: This method only works if I replace the variables with intended IP addresses and usernames via PowerShell/Cmd Prompt. Otherwise I will get the following error: "PuTTY Fatal Error: Incoming packet was garbled on decryption".

This method does work in KiTTY, but due to the security process I am asked to follow ("pam host/ip") - I don't have administrative privileges on the target device. klink -agent %user@%proxyhost -nc %host:%port

systemmonkey42 commented 1 year ago

I suggest googling the ssh 'ProxyJump' option, and using configuring the kitty connections->proxy option to suite.

If you want magic like having a set of sessions, and a set of proxies, and the ability to mix and match, you might need to write your own and submit a pull request.

An extra drop box in the session select dialog which allows you to use the session settings from A and the proxy settings from B could be really useful. I currently use folders, and duplicate sessions to achieve this, which can be a pain.