New answers tagged

2

DSA keys are no longer supported by default, and will be discontinued in a near future. It maybe that was backported to your version (I doubt it). At least consider this post as an advice not to use them. From OpenSSH 7.0 disables ssh-dss keys by default Starting with the 7.0 release of OpenSSH, support for ssh-dss keys has been disabled by default ...


0

I just had the same problem on ClearOS 7.2 while trying to login through SSH using RSA from OSX. Turns out I had to add the filename of my private key (the one that resides on the client system, OSX in this case) on the client system to the /etc/ssh/ssh_config file (this is the ssh client config file on the client machine). Otherwise it just wouldn't look ...


0

You mention that you're using scp inside your script to download packages. Your problem is with that bit. The issue is that, when you run ssh in this form: ssh user@host command ... there is no pseudo terminal allocated to the script that is running. scp tries to prompt for a password, but it needs a pseudo terminal for that, so without one, you get the ...


-3

Try this: ssh root@hostb 'bash -s' < local-script.sh


0

I've this problem after a massive update involving also libssl, solved restarting the host: # reboot


0

Run: sudo `which sshd` -p 2020 -Dd as root in one session and in another session run: ssh -p 2020 -i /path/to/refusedkey refusedkeyusername@hostname Worked for me to get the reason. My userid permissions were not set to 700. I got the o/p as below debug1: trying public key file /home/userid/.ssh/authorized_keys debug1: fd 4 clearing O_NONBLOCK ...


2

A malformed authorized_keys file on the destination host is another reason ssh outputs the "we did not send a packet" message and asks for a password instead of using pubkey auth:- debug1: Next authentication method: publickey debug1: Offering RSA public key: ~/.ssh/id_rsa debug3: send_pubkey_test debug2: we sent a publickey packet, wait for reply debug1: ...


0

After checking the permissions, and trying several other solutions listed here, I finally removed the ssh directory on the server, the setup my public key again. Server commands: # rm -rf ~/.ssh Local commands: # ssh-copy-id user@192.168.1.1 # where <user> is your username and <192.168.1.1> is the server IP


3

ssh has a "BatchMode" option which will make it simply fail rather than asking for a password. This seems much easier than having your script try to predict whether it will ask for a password. An answer to a similar question on SuperUser points out that merely disabling PasswordAuthentication won't always work because there are multiple different interactive ...


2

You can't know if it's going to work without actually trying it. There are any number of things that can go wrong. In your case, looking at the ssh_config man page, I see that there's a 'PasswordAuthentication' option which can be set to no. Looking at the ssh man page, I see that there's a '-o' option that you can use to send config options to the program. ...


3

There is upstream bug discussion this problem. Currently, openssh interprets all the errors from parsing keys in openssl as "wrong passphrase". The patch is available and it will hopefully make it to the next release. Specifically to your problem, it looks like somehow broken key. How did you get it? From your question, I see: -----END RSA PRIVATE KEY—— ...


0

I ran across the ssh_exchange_identification: read: Connection reset by peer problem in a script that starts 16 or more ssh sessions in a loop. sshd apparently can't keep up; adding a short sleep solved my problem: for i in $(seq 32) do ssh -f root@$HOST "./test_server -p $(expr $BASE_PORT + $i)" > svr${i}.out # for > 8 connections, ssh has ...



Top 50 recent answers are included