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-ASKPASS-FULLSCREEN(1)				      General Commands Manual					 SSH-ASKPASS-FULLSCREEN(1)

NAME
ssh-askpass-fullscreen - A simple replacement for ssh-askpass written with gtk2 SYNOPSIS
ssh-askpass-fullscreen DESCRIPTION
This manual page was written for the Debian distribution because the original program does not have a manual page. gnome-ssh-askpass is a GNOME-based passphrase dialog for use with OpenSSH. It is intended to be called by the ssh-add(1) program and not invoked directly. It allows ssh-add(1) to obtain a passphrase from a user, even if not connected to a terminal (assuming that an X display is available). This happens auto-matically in the case where ssh-add is invoked from one's ~/.xsession or as one of the GNOME startup pro- grams, for example. In order to be called automatically by ssh-add, ssh-askpass-fullscreen should be installed as /usr/bin/ssh-askpass ssh-askpass-fullscreen is a program that... ENVIRONMENT VARIABLES
The following environment variables are recognized: GNOME_SSH_ASKPASS_GRAB_SERVER Causes gnome-ssh-askpass to grab the X server before asking for a passphrase. GNOME_SSH_ASKPASS_GRAB_POINTER Causes gnome-ssh-askpass to grab the mouse pointer will be grabbed too. These may have some benefit to security if you don't trust your X server. Keyboard is always grabbed. SEE ALSO ssh-add(1), ssh-askpass(1). AUTHOR
This manual page was written by Marco Presi (Zufus) <zufus@debian.org>, for the Debian GNU/Linux system (but may be used by others) and it is based on that for x11-ssh-askpass by Philip Hands and the one for gnome-ssh-askpass by Colin Watson <cjwatson@debian.org> May 8 , 2004 SSH-ASKPASS-FULLSCREEN(1)
All times are GMT -4. The time now is 03:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy