Im trying to set access from ServerA(SunOS) to ServerB(Some custom Linux with Keyboard Interactive login) with SSH Keys. As a proof of concept I was able to do it between 2 virtual machines. Now in my real life scenario it isnt working.
I created the keys in ServerA, copied them to ServerB, chmod'd .ssh folders to 700 on both ServerA,B.
For me *it seems* its working, but at the end it still falls back to Keyboard Interactive. Here is the log of what I get.
Is the public key in ~/.ssh/authorized_keys on the target system written as a single line? Because keys are long strings, sometimes they are pasted as multiple lines instead of a single one. Happened to me several times.
Is public key login disabled in /etc/ssh/sshd_config on the target system (look for PubkeyAuthentication)?
Try to connect using a higher debug level, like ssh -vv or even ssh -vvv. Maybe something useful comes up.
Is the public key in ~/.ssh/authorized_keys on the target system written as a single line? Because keys are long strings, sometimes they are pasted as multiple lines instead of a single one. Happened to me several times.
Is public key login disabled in /etc/ssh/sshd_config on the target system (look for PubkeyAuthentication)?
Try to connect using a higher debug level, like ssh -vv or even ssh -vvv. Maybe something useful comes up.
Doesn't look like much. You sent a RSA key to the target host, but it didn't like it. Try ssh -vvv too.
If that does not reveal anything useful, you have to make your sshd on the target machine write to syslog. Check SyslogFacility and LogLevel in /etc/ssh/sshd_config and verify, that the syslog messages are actually written somewhere (check /etc/syslog.conf). Can't say much more considering the fact you have some sort of custom linux.
First of all thanks a lot hergp for your help. I finally figured out what was happening.
Problem was that I didnt have the following keys enabled in the sshd_config file:
Besides that, since I didnt have
command I had to manually paste the key in ServerB. That made it interpret the key as 3 separate lines.
To solve this, in case you cant use ssh-copy-id. Paste the first line of your key WITHOUT the last 2 characters, then type yourself the missing characters from line 1 and the first one from line 2, this will prevent adding a "new line" between the first and second line of the key. Repeat with the 3d line
Hi gurus,
I am NOT the SA of the servers so very limited on what I can do. Basically the scenario is like this:
Every 6 months our password expires and we have to reset them to comply to some password rules. Thing is users, me included, tend to have plaintext copy of this difficult to... (2 Replies)
Dear All,
I have a requirement where I have to SFTP or SCP a file in a batch script. Unfortunately, the destination server setup is such that it doesn't allow for shell command line login. So, I am not able to set up SSH keys. My source server is having issues with Expect. So, unable to use... (5 Replies)
Recently I have been playing with password ageing and the usage of ssh keys. I have found that if usePAM yes (default) is set in the /etc/ssh/sshd_config file then any password ageing and inactiivity can adversely affect a client with ssh keys.
For example:
Set PASS_MAX_DAYS to 60 in... (5 Replies)
Hi,
I need to run a script located in a directory on remote server by using ssh authentication from my local unix server. Can anyone help me in this.
I have tried the below command. It worked for echo command but when i tried to open a file using cat command it is showing "cat: cannot open... (6 Replies)
Hello,
I'm trying to perform these operations without entering any password, as user "fzd":fzd@machine1> scp /tmp/srcFile1 fzd@machine2:/tmp/$destFile
fzd@machine1> scp fzd@machine2:/tmp/$srcFile /tmp/$destFilebut alsofzd@machine1> scp /tmp/srcFile1 machine2:/tmp/$destFile
fzd@machine1> scp... (6 Replies)
There are two servers :
1. Site
2. Testing
from site server i want to connect testing server with ssh password less authentication.
i generated public and private keys with ssh-keygen -t rsa on site server.
cat id_rsa >> authorized_keys
cat id_rsa.pub >> authorized_keys
i... (15 Replies)
hello,
i am running an AIX 5.3 machine and i want to connect via ssh to the RPA Management site without prompting for password.
i already had a public key of this server as i use the same thing for ssh connection with other AIX machines.
i connected to the RPA Management Site and i run the... (9 Replies)
I setup the keys between 2 servers, but my user account has no password specified for it (never set one up on the account for security reasons). When I try to SSH to the server, SSH prompts for a password that doesn't exist (so I can never connect successfully).
Note: 'passwd -d Rynok' removes... (3 Replies)
Hello,
Do you guys know set of commands that can incorporate to sftp/scp/ssh to add password in a script to automate file transfer.
Our client is not using ssh keys authentication so we are force to create a script to pass the password into the script to transfer files via sftp/scp/ssh.
We... (4 Replies)
Hi all,
Basic Requirement:
To SFTP large files (usually 10GB). We use webMethods 6.1.2 (installed on Unix) as the orchstrator and make underlying Unix system calls to do the processing.
That is, if we have to SFTP a large file - webMethods will invoke a Perl script on the underlying Unix... (2 Replies)