nc and SSH

Aleran

Registered
Has anyone ever been able to ssh into a Mac OS X client through use of netcat; ie entering:

nc myhostip 22

When I do this I get the message:
SSH-1.19-OpenSSH_3.4p1

Then if I hit enter I get the message:

Protocol mismatch.

And it exits out. So has anyone gotten nc to work, and or does anyone know the version of ssh MacOSX uses? Thanks.
 
What's nc; I don't have it installed on my system? Is it a fink utility, or some other third-party utility, or something that comes only with Jag?
 
It's a third party tool called netcat. Yes you can get it from fink. It's got some cool abilities.

But back to my question, anyone gotten it to work, or know if it's possible.
 
Since SSH does some fairly complicated math to encrypt all communications, and netcat is basically just a telnet-like command, you'd have to do all the math of encryption and decryption yourself in your head.

You'd be better off getting a ssh client to do the math for you (they are called 'computers' for a reason ;)
 
I see; do you happen to know of one which can accept piped commands? As of now I can't pipe commands into the standard apple SSH.
 
seems to work fine for me. Granted not a particularly complex test, but:

Code:
: 0 12:49am; echo 'echo blart' | ssh localhost
Pseudo-terminal will not be allocated because stdin is not a terminal.
mark@localhost's password: 
Warning: no access to tty (Bad file descriptor).
Thus no job control in this shell.
12:50AM  up 25 days,  8:42, 2 users, load averages: 0.35, 0.40, 0.34
blart
: 0 12:50am;
 
Back
Top