LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-27-2011, 04:57 AM   #1
musammil123
LQ Newbie
 
Registered: May 2011
Posts: 14

Rep: Reputation: Disabled
How to disable SSH key authentication in linux


Hi All,
We have installed the Centos on server. I have enabled the ssh key authentication in that server. Now we can connect through ssh only with key file.

Since this server is protected with SSH, I am unable to use the SCP command. If I use this command it says "Permission denied (publickey,keyboard-interactive).".

Please let me know How Can I disable SSH Key or why SCP command is not working ?


Thanks
Mohamed
 
Old 05-27-2011, 05:46 AM   #2
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Ubuntu 10.10, Slackware 64-current
Posts: 2,124

Rep: Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776
The SCP command should work just fine with key based authentication. In fact if you can ssh from a particular machine and user account you should be able to SCP. My initial guess would be that you are trying to SCP as a different user, e.g. root, than you are using for SSH as each user stores the key in their /home/.ssh/ folder. In you sshd_config file you can enable both password and key authentication, by turning password_authentication to yes and restarting ssh. This would negate most of the advantages of using key based authentication, however.

You can try to use the SCP and SSH with the -v flag which will give you verbose output and should show you where things are going wrong.
 
Old 05-27-2011, 07:06 AM   #3
musammil123
LQ Newbie
 
Registered: May 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Hi
My Question is I have installed the ssh key authentication in Server A. User can connect this using key file via SSH. without authentication user can't connect this system via SSH. Now I am trying to copy the file from Server B through SCP command. But it is not working. While I am trying use this command from Server B I am getting below error "ssh: connect to host xxx.xxx.xxx.xxx port 22: Connection timed out lost connection".
xxx.xxx.xxx.xxx is Server A. SSH is enabled in both server A,B.

Please let me know why SCP command is not working?


Thanks
Mohamed
 
Old 05-27-2011, 09:24 AM   #4
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Moved to Server, as this isn't a security question.
 
Old 05-28-2011, 02:46 AM   #5
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 11.4
Posts: 1,319

Rep: Reputation: 252Reputation: 252Reputation: 252
Can you paste the output of the scp command when using in addition the options -vvv (yes, three times) please.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
public key authentication for ssh - linux client to winxp server cdaaawg General 6 03-10-2008 04:38 PM
Public key authentication with ssh elnacho12 Linux - Networking 3 12-18-2007 08:38 AM
Public Key Authentication with SSH edafe Ubuntu 1 08-26-2006 11:06 AM
Can't use public key authentication with SSH Noob69 Linux - General 5 01-06-2006 06:27 AM


All times are GMT -5. The time now is 07:11 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration