KpyM Telnet/SSH Server - Forum
Transfer of special characters |
Eugene |
Transfer of special characters |
May 04 2013 01:00 |
|
Hi,
I use my mac's terminal to ssh to kpym ssh server installed on windows image. In the terminal, i can successfully authenticate to ssh server, and then i do ' type binary_file_win.bin', and then grab the output from mac's terminal screen and save it to a file on mac 'binary_file_mac.bin'. Next, i compare content of this file against original 'binary_file_win.bin' stored on windows image. Comparison reveals a number of special characters which are different. Is there anything that can be done in order for files to match? Below goes simple bash script that i use on my mac:
#!/usr/bin/expect -f
set timeout 5000
spawn ssh Administrator@192.168.0.100
expect "password:"
send "mypassword"
send "\n"
expect "C:*Administrator>"
log_file -noappend binary_file_mac.bin
send "type binary_file_win.bin\r\n"
expect "C:*Administrator>"
log_file
send "exit"
|
Andrii |
|
Sep 04 2013 15:55 |
|
Why you use "type" for file transferring? You should use scp or sftp for this cause I don't think it's possible to display all binary content correctly on screen and then save it back to a file cause there are a lot of non-printable chars in binaries.
|
© 2007 - 2008 Kroum Grigorov