1838240 Members
3341 Online
110125 Solutions
New Discussion

slow ssh

 
Jan Hawes
Occasional Contributor

slow ssh

Hallo,

we have some shell script that uses remsh and rcp and we want to replace them with ssh and scp. It works fine but it takes a lot of time.
A "remsh ls" needs 0.1 seconds and a "ssh ls" needs 3.4 seconds.

When I start ssh with the "-d" option then I geht the following failed messages.
Do you know how I can fix that problem?

...
debug1: Starting up PAM with username "jaha"
debug1: PAM setting rhost to "client"
Failed none for jaha from 53.141.246.120 port 59110 ssh2
debug1: userauth-request for user jaha service ssh-connection method external-keyx
debug1: attempt 1 failures 1
debug1: No suitable client data
Failed external-keyx for jaha from 53.141.246.120 port 59110 ssh2...
3 REPLIES 3
harry d brown jr
Honored Contributor

Re: slow ssh

The only way to "fix it" is to get a bigger faster machine and a bigger faster network.

ssh is encrypting and decrypting on the otherside, so it's just a fact of life that it's going to be slower.

live free or die
harry
Live Free or Die
Chris Wong
Trusted Contributor

Re: slow ssh

Are you using /dev/random? If you have 11i, implement this and it will run much faster.

http://newfdawg.com/SSHpart5.htm

Is the problem just that it is slow or do you want it to use one of these failed authentication methods? If so, could you post your config files?

- Chris
Chris Vail
Honored Contributor

Re: slow ssh

As Harry Brown points out, ssh and scp is slower because of the encryption/decryption that is happening. Let me add that, once this initial handshaking has happened, the communication is just as fast as remsh or rcp. I've attached my ever-popular document on installing and using ssh/scp. From your debug output, I think you've got a problem with the handshaking--perhaps a permission issue. Take a look and try it again. It'll never be as fast as remsh/rcp, but you can help it out a bit with proper configuration.

Chris