Ssh issues

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Ssh issues
# 1  
Old 05-22-2017
Ssh issues

i have two servers that i have installed ssh but i want to copy the public keys from one server to the other using the ssh-copy-id user@x.x.x.x
i do get a message to put my password for that user and it then comes out with an error message permission denied after imputing my password for this user account
# 2  
Old 05-22-2017
Can you ssh to host with that user or the same error appears ?

Check out sshd_config on the server, specifically for existence of directives :
Code:
DenyUsers
AllowUsers
DenyGroups
AllowGroups

This User Gave Thanks to Peasant For This Post:
# 3  
Old 05-22-2017
I dont have that in my sshd_config file do i need to add it and where
# 4  
Old 05-22-2017
Quote:
Originally Posted by DOkuwa
I dont have that in my sshd_config file do i need to add it and where
You do not need to have those. Those are possible entries that might prevent you from login in. The default configuration does not have them.

There is nothing special about ssh-copy-id It's a helper shell script that allows you to blindly setup a /home/user/.ssh/authorized_keys file and copy the public key to it. I could say that it is border line dangerous.

Make sure you can login to the node, normally with the password, using just ssh. If you can login on the remote node as the user, do the following:

Code:
mkdir ~/.ssh
touch ~/.ssh/authorized_keys
chmod 700 ~/.ssh
chmod 644 ~/.ssh/authorized_keys

In your local node where the key pair was created:
cat and copy the ~/.ssh/id_rsa.pub or ~/.ssh/id_dsa.pub showing in the screen.
In the remote server:
open the ~/.ssh/authorized_keys and paste the blob that you just copied from the local node. Save the file.

The important part is to have proper credentials to login on the remote server via ssh.

Last edited by Aia; 05-22-2017 at 11:03 PM..
# 5  
Old 05-23-2017
The issue i also have is that i cannot login into the box
with ssh
# 6  
Old 05-23-2017
So, how would you like to authenticate with the server? Should it allow anyone to just create an account and set up keys perhaps?

You need to have a valid account to sign in as first. You must have the ability to sign in, else you have no protection at all. This can be done but, um, you need an account on the box to do it Smilie Would you want just anybody to be able to sign on as anybody?

Surely the answer is no. So, who would grant you access to the the user account that you want to use with an ssk-key?



Robin
# 7  
Old 05-23-2017
I already have an account on both servers and this is not an issue
I run on Ubuntu and if I don't have an account I would not be able to login to box servers
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Issues making SSH non-Interactive

I fire the rsyn command as below: rsync --delay-updates -F --compress --archive -e "/usr/bin/ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" user1@myhost.server.com:/tmp/jarexplorer-0.7.jar /web/admin/data/ The above command get interpreted as below: ssh -vvv -o... (4 Replies)
Discussion started by: mohtashims
4 Replies

2. Shell Programming and Scripting

Remote script over ssh execution issues.

If I execute below code I am able to get string from column8 and column10 about a process. serverA1$> ps -ef | grep rotate | grep 'config' | awk '{print $8" "$10}' /<Oracle_home>/ohs/bin/odl_rotatelogs -h:/<app_Home>/config/OHS/ohs1/component_events.xml_ohs1... (12 Replies)
Discussion started by: kchinnam
12 Replies

3. Shell Programming and Scripting

ssh code issues

Hi guys. I intend to develop a script to perform certain activities on several servers at the same time. Currently I am working with 2 servers only. I want to ssh for M1 over to M2 and run some commands. My code is like this at M1: #!/bin/bash ssh M2 cd /tmp mkdir folder1 cd folder1... (2 Replies)
Discussion started by: Junaid Subhani
2 Replies

4. HP-UX

Remote ssh execution and .profile issues

Greetings, i'm currently having issues in successfully executing a script from one server to other, and i'm cracking my nut in understanding why. Let's get started with the default info: Server A: briozzo@A:/home/briozzo $ uname -a HP-UX A B.11.31 U ia64 2787251109 unlimited-user license ... (3 Replies)
Discussion started by: nbriozzo
3 Replies

5. Red Hat

issues with ssh login

I have a Rhel 3 machine. I can login to it through telnet. The config files /etc/ssh/sshd_config and /etc/ssh/ssh_config has not been modified. But the IP address of the system was changed. Could this be issue? It was earlier configured for passwordless login(dsa). I tried moving the... (4 Replies)
Discussion started by: kirtikjr
4 Replies

6. Solaris

SSH and PAM authentication issues on Solaris 10

This is a zone running Solaris 10u8 on a 6320 blade. The global zone is also running 10u8. One my users is attempting to change his password and getting a following screen: $ ssh remotesys Password: Warning: Your password has expired, please change it now. New Password: Re-enter new... (1 Reply)
Discussion started by: bluescreen
1 Replies

7. OS X (Apple)

ssh passphrase issues - Mac OS X

ssh passphrase permissions issues I will try to be as thorough as possible, but keep in mind I am a designer, not a programmer... I do have linux mdadm experience and am reasonably comfortable behind the terminal, but I may need things to be spelled out for me. I am using 2 new-ish Macs with... (1 Reply)
Discussion started by: Ahab the Eskimo
1 Replies

8. UNIX for Dummies Questions & Answers

Solaris 10: Cannot ssh into machine- authentication issues

Greetings! I just managed to install Solaris 10 on a Sparc based machine. However, there might be a problem with the way ssh is configured. I CAN ssh from the machine into another on the network (same subnet, as root), but then the newly installed machine CANNOT seem to accept incoming ssh... (2 Replies)
Discussion started by: agummad
2 Replies

9. Shell Programming and Scripting

Trying to run a script over ssh, having issues with tty assignment

Hey folks! I'm trying to run a tcpdump command that monitors for possible malicious traffic. I want to be able to run this on any of several remote boxes that I monitor which all have different capture interfaces. I've gotten the script to the point where it logs into the box and attempts to run... (8 Replies)
Discussion started by: JASI
8 Replies

10. Shell Programming and Scripting

is running this command via ssh possible? (formatting issues)

Here is the command I want to run: for pkg in `pkginfo | grep -i VRTS | awk '{print $2}'`; do showrev -p | grep $pkg; done | awk '{print $2 "\t" $7}' | uniq It returns the package info in a form such as: 113210-03 VRTSfspro 112392-06 VRTSvmman 113596-03 VRTSvmpro... (1 Reply)
Discussion started by: LordJezo
1 Replies
Login or Register to Ask a Question