Sponsored Content
Full Discussion: ssh login and auth errors
Top Forums UNIX for Dummies Questions & Answers ssh login and auth errors Post 302344266 by System Shock on Saturday 15th of August 2009 12:35:38 PM
Old 08-15-2009
You can remove both entries in known_hosts. They'll get re-populated when you connect to other servers.

There is an obvious error in the third command you typed. You need to put your pub key inside your home directory's ssh folder, and it needs to be in a specific file. If the school's server is using openSSH, you should add your key to ~/.ssh/authorized_keys . If the school's server is using a commercial ssh, then you may have to convert your pub key to their format.

Anyway, let's start from the top. You said that, if you remove all the contents from your .ssh folder, you can ssh to the schools server. So, go ahead and do that, and try to log in and log out the server a couple times just to make sure your login and password work. If you wiped everything off your .ssh directory, you should get a message asking you if you want to accept the server's public key, which should populate .ssh/known_hosts with one entry. While you are there, check to see if you have a .ssh directory inside your home directory, if you don't create one, give it 400 permissions
Code:
$ mkdir .ssh
$ chmod 400 .ssh

After you have established that you can ssh to the server and log in with your username and password, go ahead and create your key. The command below includes the -N flag. If you don't want to supply a passphrase every session, then -N "" will set your passphrase to nothing.
Code:
 ssh-keygen -t rsa -N ""

Now, you'll copy your id_rsa.pub to your home directory in the remote server. Again, assuming the school's server is using openSSH, you'll put your public key in authorized_keys.
Code:
scp ./ssh/id_rsa.pub remote.server.edu:~/.ssh/authorized_keys

Now you should be able to ssh from your computer to the server. If you can't, then we'll need to know the error you received, and take it from there.

About StrictHostKeyChecking=no :
What this does, basically it allows the connection to continue even if you get back the error you posted, that the server pub key and what's in your known_hosts file doesn't match. It is possible that the school server's administrators change the key frequently for whatever reason, and that is why they instruct to add that line to your ssh config. I have that entry in my lab servers, but I don't know that I want to use it in production.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

SSH Problem auth problem

Hi, Just recently we seem to be getting the following error message relating to SSH when we run the UNIX script in background mode: warning: You have no controlling tty. Cannot read confirmation.^M warning: Authentication failed.^M Disconnected; key exchange or algorithm negotiation... (1 Reply)
Discussion started by: budrito
1 Replies

2. HP-UX

X-server errors at login? I want to just get rid of this!

The CDE login manger may repeatedly scroll these error messages on the console: **************************************************************** * The X-server cannot be started on display <hostname>:0... * For details look into the file, Dtlogin.errorLogFile (default: *... (6 Replies)
Discussion started by: emplate
6 Replies

3. UNIX for Advanced & Expert Users

SSH errors

hellow Experts, I want to know that whenever i run ssh command, i get this error > ssh username@x.x.x.x ssh: connect to host x.x.x.x port 22: No route to host or connection refused i want to know the exact reason for these errors .. like because of firewall , no physical conection ,... (3 Replies)
Discussion started by: luckypower
3 Replies

4. AIX

SSH + LDAP Auth Giving Fits

I'm having a bear of a time getting my LDAP connection going, so I hope someone here has some insight. I have AIX 5.3 running on an LPAR. I have ldap-client, ldap-max-crypto-client, gskak, and gskte installed. I'm able to set up the connection via mksecldap, and I can query users just fine... (1 Reply)
Discussion started by: AlexDeGruven
1 Replies

5. UNIX for Dummies Questions & Answers

ssh pub key auth - can some please guide me idiot proof

hello. can somebody please idiot proff simple guide me how to set up ssh public key authenciation? i am stuck, i tried long and googled a lot but i cant get it. thanks in advance. (4 Replies)
Discussion started by: scarfake
4 Replies

6. Solaris

SCP & SSH errors

Hi I am trying to scp a file between to servers (both on same subnet and can see each other). However, whenever I try I get the following error: ld.so.1: ssh: fatal: relocation error: file /usr/local/bin/ssh: symbol EVP_CIPHER_CTX_key_length: referenced symbol not found lost connection I... (4 Replies)
Discussion started by: skewbie
4 Replies

7. AIX

ssh public key auth "Remote login for account is not allowed" ?

Hello, Using AIX 6.1 boxes. User user1 connects from box A to box B using ssh. When password authentication is used everything is fine. When I configure user1 to use public key authentication sftp client works fine(no password asked), but ssh client fails. This is sshd log: Accepted publickey... (3 Replies)
Discussion started by: vilius
3 Replies

8. HP-UX

telnet login successful ,but ssh can not login

why I can login by telnet using root account but when i use login by ssh using root account it is not successful ,is it different password i am sure ssh service is started (2 Replies)
Discussion started by: alert0919
2 Replies

9. UNIX for Dummies Questions & Answers

SSH SSH encountered 1 errors during the transfer

This issue was resolved due to using the correct user transferring the file over to the desktop. (1 Reply)
Discussion started by: Computergal2104
1 Replies

10. UNIX for Beginners Questions & Answers

Ssh errors

hello all Happy New year I have an issue here whenever I want to ssh into a particular server I get this error message "Disconnected: NO supported authentication methoids available (server sent publickey) I was trying to copy the public key to another server so that I do not need nto... (7 Replies)
Discussion started by: DOkuwa
7 Replies
SSH-KEYSIGN(8)						    BSD System Manager's Manual 					    SSH-KEYSIGN(8)

NAME
ssh-keysign -- ssh helper program for host-based authentication SYNOPSIS
ssh-keysign DESCRIPTION
ssh-keysign is used by ssh(1) to access the local host keys and generate the digital signature required during host-based authentication with SSH protocol version 2. ssh-keysign is disabled by default and can only be enabled in the global client configuration file /etc/ssh/ssh_config by setting EnableSSHKeysign to ``yes''. ssh-keysign is not intended to be invoked by the user, but from ssh(1). See ssh(1) and sshd(8) for more information about host-based authen- tication. FILES
/etc/ssh/ssh_config Controls whether ssh-keysign is enabled. /etc/ssh/ssh_host_dsa_key /etc/ssh/ssh_host_ecdsa_key /etc/ssh/ssh_host_rsa_key These files contain the private parts of the host keys used to generate the digital signature. They should be owned by root, read- able only by root, and not accessible to others. Since they are readable only by root, ssh-keysign must be set-uid root if host- based authentication is used. /etc/ssh/ssh_host_dsa_key-cert.pub /etc/ssh/ssh_host_ecdsa_key-cert.pub /etc/ssh/ssh_host_rsa_key-cert.pub If these files exist they are assumed to contain public certificate information corresponding with the private keys above. SEE ALSO
ssh(1), ssh-keygen(1), ssh_config(5), sshd(8) HISTORY
ssh-keysign first appeared in OpenBSD 3.2. AUTHORS
Markus Friedl <markus@openbsd.org> BSD
August 31, 2010 BSD
All times are GMT -4. The time now is 02:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy