Comments (48)
ZModem feature is broken from 0.71 PuTTY version.
The last KiTTY version that support ZModem is 0.70.0.10. It is still available at Fosshub.
A new link was added at the ZModem page of the KiTTY official website.
from kitty.
I digged into the tmux source as well and found out about DCS passthrough. I updated my script accordingly and changed it to printf at the same time. The following script will detect if likely running in a tmux session or not ($TERM set to screen-256color or similar), and then do the job, as fully documented at https://wiki.chotaire.net/windows10-kitty-winscp - enjoy!
#!/bin/bash
if [[ $TERM = screen* ]]; then
printf '\ePtmux;\e\e]0;__wt:%s:%s:%s\a\e\\' "$(hostname -f)" "$USER" "$PWD"
else
printf '\e]0;__wt:%s:%s:%s\a\e\\' "$(hostname -f)" "$USER" "$PWD"
fi
I hope this will be helpful to people who really miss the convenience feature of zmodem. ;) @cyd01 you are invited to take everything you need to update KiTTY documentation.
from kitty.
I agree
from kitty.
Hi @antdude ,
The Z-Modem support is broken stanting with the PuTTY tree 0.72. So you need to use any KiTTY version 0.71.x. I'm still waiting for it in the new tree, but this is hard to reimplement as the PuTTY has changed a lot.
In the meantime, I suggest to @cyd01 to do these two things to overcome this limitation:
- Provide the last binary version of the KiTTY with Z-Modem support.
- Incorporate a Menu Command (supporting a shortcut) to "Duplicate (with ancient version)", that calls to another different KiTTY binary (with Z-Modem support) and opens the same session on it.
This workaround can be sufficient until someone can work on Z-Modem with the current tree.
Regards.
from kitty.
Hi @hsn10 ,
Can't you just made ZMODEM internal? Its not that difficult protocol
This KiTTY project is a one person spare time project. Even I love to have Z-MODEM inside KiTTY, at time, I feel is not in top list of priorities for @cyd01 . So if you can help fixing the support, then please speak with him. Futhermore I have some ideas/suggestions to implement it in a easy way, but I don't have sufficient time to help coding it. Then if you start to code something I can try to collaborate.
Regards.
from kitty.
No, it has nothing to do with ancient systems at all. I used to install lrzsz on some 70 servers because using zmodem is possibly the easiest way to quickly inject or fetch a file from a system with KiTTY. Running WinSCP, which doesn't take the current working directory from the existing SSH session, is absolutely no alternative to this.
from kitty.
Alrighty then, I looked into the KiTTY source and hacked something together. The following script, when executed on the remote host through a KiTTY ssh session, will spawn a WinSCP session to the current FQDN hostname of the destination host. It will connect using the current SSH username and auto-navigate to the present working directory. This will even work if you have used an intermediate host to proxy yourself to the destination host (with proper FQDN hostname set) if both hosts use the same SSH port. Naturally, this will require all your hosts to be reachable via DNS hostnames from your current desktop. I saved this script as /usr/local/bin/winscp
:
#!/bin/bash
echo -ne "\033];__wt:$(hostname -f):${USER}:${PWD}\007"
Now documented here: https://wiki.chotaire.net/windows10-kitty-winscp
from kitty.
I just updated above script to fix some issues and make it proper. Also, it works with screen (tested with screen 4.8.0). My job is done here, if someone is still willing to work on z-modem for ancient systems, I'll be happy to test. You all stay healthy.
from kitty.
On servers exposed on internet the first thing you should do for security purpose is to change the ssh port.
Sure! That's the most simple/generic/basic instruction for security.
In my case I have set a custom default SSH port in WinSCP, all my hosts use the same one. When the botnets find the port on one of my boxes (sometimes it happens within months, sometimes it takes years), I'll change it on all of them at the same time.
from kitty.
Hi @cyd01 ,
Any idea why the ZModem transfers doesn't work?
In my opinion the problem can be related to a non-clean transmission of the data. Perhaps the new implementation of the Terminal will block some messages.
from kitty.
Hi @cyd01 ,
For Cyterm connections I still use KiTTY 0.70. As all config files are compatible, it's not a problem to use two different executables (0.71 & 0.70). And for starting a Cygterm session I only need to open the 0.70 version.
However, for Z-Modem it's quite different. I use 0.71 regulary and then if I need to use Z-Modem, then I need to open another copy of the session using 0.70. So, I request if you can add a command, like "Open with WinSCP", but with the name "Open with another KiTTY".
With this simple hack will be possible to support some legacy (or droped) functionalities.
Your agree?
from kitty.
Hi @cyd01 ,
After resolving the problem of the Cygwin integration replacing the old cygterm
patches with the new cygtermd
binary, then only exists one missing functionality not integrated in the new 0.7x (>0.70) branch. That's the Z-MODEM capability.
You'll work at some time to restore/re-implement this support?
from kitty.
Hi @cyd01 ,
With the last version 0.73.1.5 all functionalities are in pair with the 0.69.x/0.70.x versions of the KiTTY. However, still the Z-MODEM is the only one missing functionality. I don't want to be rude, as my objective is to collaborate. But regarding the Z-MODEM support I feel it will be interesting to have some support. Even if this support isn't complete or uses some trick.
To be clear: Do you have any idea to implement it, or is it too complex and difficult to implement?
I want to know your opinion, so please comment about it.
Regards.
from kitty.
from kitty.
Hi @cyd01 ,
There are 3 features not implemented into KiTTY>=0.71
- PuTTYCrypt patch to get credentials from certificate (sshpubk.c merge fails)
Not required. Use the pagent
from PuTTY-CAC https://github.com/NoMoreFood/putty-cac
My suggestion is to remove all ancient code related to this inside KiTTY.
- Zmodem to transfer files with ZModem protocol
😉
- covidimus patch for background image, I know, it is completely useless ... but I really like it I know
OK. No problem, I feel it can't be very difficult. Try first to Z-Modem.
ZModem is the most important. And to be honest I've no idea how to make it. I've already ask for help ... with no success.
Can you please repeat the problems with the current state of the Z-Modem implementation?
In any case, my first suggestion is to remove the configuration of the binaries from the session configuration, and move all to the kitty.ini
config. The path of the binaries are part of the process and not part of a session. After that, we can try to debug the functionality. You agree?
from kitty.
Please bring back Z-Modem file transfers in KiTTY. :) What was the last KiTTY version that had it working? I am still using v0.70.7p @ 28/11/2018-09:15:25(GMT) in my decade old, updated 64-bit W7 HPE SP1 PC.
from kitty.
Thank you, @lars18th but v0.71.0.7p (@ 25/07/2019-17:36:22(GMT) doesn't seem to have Zmodem. :(
from kitty.
Thank you, @lars18th but v0.71.0.7p (@ 25/07/2019-17:36:22(GMT) doesn't seem to have Zmodem. :(
For this reason I suggest @cyd01 to share the last version supporting it. Perhaps he can add a link to download it in http://www.9bis.net/kitty/#!pages/ZModem.md before the zs/rz binaries.
from kitty.
Thank you. I just downloaded and tried its kitty_portable-0.70.0.10.exe, from https://www.fosshub.com/KiTTY-old.html, briefly. :) Weird that I lost and redo my settings though.
from kitty.
Hi @cyd01 ,
Incorporate a Menu Command (supporting a shortcut) to "Duplicate (with ancient version)", that calls to another different KiTTY binary (with Z-Modem support) and opens the same session on it.
Perhaps a very simple workaround: adding a second optional parameter to the current "__ds:" command the same functionality can be provided. So suppoting "__ds:PATH:BINARY" the BINARY here is added to call to this specific alternative KiTTY binary instead of the current binary. Then this alternative can be an old version provided by the user with the ZMODEM support.
What you think? Quite tricky, but effective?
from kitty.
Can't you just made ZMODEM internal? Its not that difficult protocol
from kitty.
So do you have some freely licensed ZMODEM code and know-how to hook it up?
from kitty.
So do you have some freely licensed ZMODEM code and know-how to hook it up?
NOP!
But you can review the current disabled source code in KiTTY:
https://github.com/cyd01/KiTTY/blob/master/zmodem/winpzmodem.c
The problem at time is that packets interchanged over the terminal are interfering with the current implementation. So if you can debug and fix it then... 😉
from kitty.
It really seems no one could help.
from kitty.
Hi @cyd01 ,
You're still interested in maintain the Z-MODEM support, or it will be definitively removed?
from kitty.
Without help, I think it is definitively removed.
from kitty.
Without help, I think it is definitively removed.
OK. I agree. Perhaps then you want to remove all traces of this in the code. After then you can close this issue if you want.
Thank you for your effort with KiTTY! I'm sure it's preferable to address issues that have relevance.
Regards.
from kitty.
I agree
from kitty.
I agree
Then I close the issue forever.
from kitty.
You may close it, but it doesn't mean we're not missing this feature like crazy :(
from kitty.
You may close it, but it doesn't mean we're not missing this feature like crazy :(
Yes, it will be interesting to have it. However, if @cyd01 can't maintain it, I prefer it has be removed at all. Then we can use an ancient KiTTY version to make use of the ZMODEM transfer. In fact, only for selected old systems the Z-MODEM transfer has sense. So, for the day-to-day use this functionality is not mandatory. And we prefer that the development of the KiTTY will not be staled.
Don't you think so?
from kitty.
If you know of a way to pass CWD to WinSCP, I'll be happy to abandon this ticket.
from kitty.
sz and rz are nice quick small downloads and uploads in Termimals without SCP, SFTP, etc.
from kitty.
The above doesn't work when in a tmux or screen session, tested with tmux version 3.1 and GNU screen 4.08. It appears that the control sequence is somewhat being filtered. I am currently looking for advice on this. A workaround would be to use SuperPutty instead of tmux for terminal multiplexing.
from kitty.
Hi @chotaire ,
Please try to understand that this is a free project supported by one individual (@cyd01) in his spare time. So, if you need something for your work perhaps it will be more positive if you provide some help. The Z-Modem patch originially was not developed by @cyd01 , and he has tryed to maintain it until it has been impossible with the current PuTTY code.
After that, the support for the winscp
script is inside KiTTY for years. And I'm using it, and it works perfectly. So it isn't something new.
And if you really need the Z-MODEM support, I repeat: ancient versions of KiTTY have support for it. You can use it! Where is the problem?
from kitty.
Hi @lars18th . My apologies for being negative (?) by not asking you to do anything, while supplying documentation of an acceptable workaround to people who also used zmodem for convenience reasons. The "problem" is that people update their software for receiving bug- and security fixes.
from kitty.
Hi @chotaire ,
OK. The problem is that maintaining a fork of a project (KiTTY is a fork of PuTTY) has a lot of challenges. So @cyd01 is doing the best as he can to incorporate the functionalities that the original maintainers of PuTTY don't want to integrate. And regarding the Z-MODEM support he has done a lot of effort, but he can't resolve all the troubles. So, in fact the best it will be that the stock PuTTY project will support the Z-MODEM protocol. Perhaps you can ask for it.
Regards.
from kitty.
Hi @chotaire ,
This is a very good contribution. I feel @cyd01 will want to update the script. Perhaps this info can help too to solve other terminal issues related with tmux (and screen).
Regards.
from kitty.
Hi @chotaire ,
Thank you for your contribution. Perhaps now @cyd01 will wants to open a Wiki sections for scripts, or provide a subdirectory of the repository to include "user-scripts".
Regards.
from kitty.
I digged into the tmux source as well and found out about DCS passthrough. I updated my script accordingly and changed it to printf at the same time. The following script will detect if likely running in a tmux session or not ($TERM set to screen-256color or similar), and then do the job, as fully documented at https://wiki.chotaire.net/windows10-kitty-winscp - enjoy!
#!/bin/bash if [[ $TERM = screen* ]]; then printf '\ePtmux;\e\e]0;__wt:%s:%s:%s\a\e\\' "$(hostname -f)" "$USER" "$PWD" else printf '\e]0;__wt:%s:%s:%s\a\e\\' "$(hostname -f)" "$USER" "$PWD" fi
I hope this will be helpful to people who really miss the convenience feature of zmodem. ;) @cyd01 you are invited to take everything you need to update KiTTY documentation.
I've added this function to the documentation on the website:
winscp() { printf "\033Ptmux;\033\033]0;__ws:"`pwd`"\007\033\\" ; }
Just a remark: don't base you script on TERM
variable only. This is not reliable.
For example in my case, I use tmux
with TERM=putty-256color
.
from kitty.
I digged into the tmux source as well and found out about DCS passthrough. I updated my script accordingly and changed it to printf at the same time. The following script will detect if likely running in a tmux session or not ($TERM set to screen-256color or similar), and then do the job, as fully documented at https://wiki.chotaire.net/windows10-kitty-winscp - enjoy!
#!/bin/bash if [[ $TERM = screen* ]]; then printf '\ePtmux;\e\e]0;__wt:%s:%s:%s\a\e\\' "$(hostname -f)" "$USER" "$PWD" else printf '\e]0;__wt:%s:%s:%s\a\e\\' "$(hostname -f)" "$USER" "$PWD" fi
I hope this will be helpful to people who really miss the convenience feature of zmodem. ;) @cyd01 you are invited to take everything you need to update KiTTY documentation.
I've added this function to the documentation on the website:
winscp() { printf "\033Ptmux;\033\033]0;__ws:"`pwd`"\007\033\\" ; }
Just a remark: don't base you script on
TERM
variable only. This is not reliable.
For example in my case, I usetmux
withTERM=putty-256color
.
Another remark: I think I should change the separator :
(with |
?) for __wt
, __ws
... internal functions.
With :
it is not possible to precise a specific ssh port with __wt
.
On servers exposed on internet the first thing you should do for security purpose is to change the ssh port.
from kitty.
On servers exposed on internet the first thing you should do for security purpose is to change the ssh port.
Sure! That's the most simple/generic/basic instruction for security.
from kitty.
Careful. pwd
could be... anything. Take a look at my line again ;)
I am not aware of any other way than basing on TERM
, because tmux and screen doesn't remotely expose anything else without the user explicitly passing something other during SSH connect. For local sessions, one could check if TMUX
or STY
(screen) exists.
from kitty.
This will check if:
- We are in a local screen session, regardless of
TERM
setting, so we'll do DCS passthrough withouttmux;
. - We are in a local tmux session regardless of
TERM
setting (we'll sendtmux;
)- Or we have connected remotely while in a tmux/screen session and rely on
TERM
beingscreen*
(same output needed because we can't differentiate between screen or tmux as nothing else is exposed)
- Or we have connected remotely while in a tmux/screen session and rely on
- Else we are supposedly not using tmux or screen and don't need tmux/screen DCS passthrough
#!/bin/bash
if [ -n "$STY" ]; # we're in a local screen session
then
printf '\eP\e\e]0;__wt:%s:%s:%s\a\e\\' "$(hostname -f)" "$USER" "$PWD"
elif [[ $TERM = screen* ]] || [ -n "$TMUX" ]; # either connected remotely while in tmux/screen or locally in tmux
then
printf '\ePtmux;\e\e]0;__wt:%s:%s:%s\a\e\\' "$(hostname -f)" "$USER" "$PWD"
else
printf '\e]0;__wt:%s:%s:%s\a\e\\' "$(hostname -f)" "$USER" "$PWD"
fi
This is the best I can do. At least this will cover people with local screen/tmux sessions that use a terminal other than screen*
. As a bonus, this will no longer display the tmux;
string for screen users in local sessions.
from kitty.
Hi,
One (dirty) alternative if some user requires to use ZMODEM with KiTTY:
- Download the PuTTY-nd from here: https://sourceforge.net/projects/putty-nd/files/
- In KiTTY enable the option for Sharing an SSH connection between PuTTY tools --> [x] Share SSH connections if possible" and connect to your server.
- Then open the PuTTY-nd with the same option for sharing enabled, and set the same HOST NAME. The new connection inside this alternative PuTTY-nd fork will use the same connection as KiTTY. So you can use KiTTY with all enhancements to connect to your server as you do regularly.
- To use ZMODEM inside the new session in PuTTY-ng, then use common terminal tools (sorry, no UI in this PuTTY-nd fork):
- To send a file, type in the terminal
lsz my_file.txt
and automatically the ZMODEM transfer will start. - To receive a file, type in the termianl
lrz
and automatically a window will be opened to select the file to send. - Commands
lsz
andlrz
are in the linux packagelrzsz
, that are terminal tools for ZMODEM.
- To send a file, type in the terminal
The advantage of this "solution" over others, is that you don't need command line sz.exe or rz.exe tools. And the configuration of the KiTTY will be clean of any ZMODEM tools. Futhermore, the PuTTY-nd is a single .EXE and it can work with the KiTTY connection without any trouble. And the ZMODEM support is internal. So you can use it very easy (if you know that it doesn't have any UI).
I hope this will help users who still need ZMODEM support and want to use KiTTY as the transport connection.
Regards.
from kitty.
Hi @cyd01 ,
I reopen this issue for users that are searching for a solution. The internal ZMODEM in KiTTY is completly close. So don't worry about future requests about it. It's open only as a reference.
from kitty.
Issue closed due to inactivity
from kitty.
so as zmodem dropped, can we just remove the configuration key [zmodem] in kitty.ini ? in case of miss understanding when new guys open it.
from kitty.
Related Issues (20)
- download executables mixed up?
- Feature: mDNS service discovery
- Issue with Multi Tab Putty HOT 1
- Make prompt for "Allow far2l clipboard sync?" optional.
- Different interface between Win10 and Win11 HOT 5
- [Feature request]Please provide an installer with silent options
- Can the autoreconnect feature be added to the command line parameters? HOT 3
- [Feature request] "New duplicated session..." with default Host Name
- Terrapin vulnerability mitigation HOT 2
- How do I change 16 sessions for displaying opened sessions horizontally to just 3 sessions ?
- Kageant: Cannot get rid of bogus "Couldn't load this key" popup HOT 1
- UTF-8 encoded `Windows Title` is not decoded properly HOT 3
- How to adjust the space between lines?
- Buffer Overflow Vulnerabilities in KiTTY Start Duplicated Session Hostname (CVE-2024-25003) & Username (CVE-2024-25004) Variables
- Command Injection Vulnerability in KiTTY Get Remote File Through SCP Input (CVE-2024-23749)
- Is this project dead? Search for alternatives HOT 14
- [HELP] Is there a way to store auto-login username and password PER SESSION / per IP adress? HOT 2
- DetachedCertificate supported in Putty but not in Kitty HOT 1
- I can't see the option 'Wam before OSC52 clipboard sync' on low resolution display?
- CVE-2024-31497: Secret Key Recovery of NIST P-521 Private Keys Through Biased ECDSA Nonces in PuTTY Client HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kitty.