Question

SSH Login

Asked by: mudskipperw

i am trying to setup the ssh login between a linux box and freeBSD server with Cpanel.

i have generated the private, public keys on the linux box then copied to freeBSD server
ssh-keygen -t dsa
......

you can see below the debug msg when i try to ssh to the server.
debug: SshAppCommon/sshappcommon.c:154/ssh_app_get_global_regex_context: Allocating global SshRegex context.
warning: PubkeyAuthentication configuration keyword is deprecated. Use AllowedAuthentications.
warning: Unrecognized configuration parameter authorizedkeysfile
warning: Unrecognized configuration parameter subsystem
debug: Connecting to xxx.x.xxx.xxx, port 22...
debug: Ssh2/ssh2.c:1956/main: Entering event loop.
debug: Ssh2Client/sshclient.c:1328/ssh_client_wrap: Creating transport protocol.
debug: SshAuthMethodClient/sshauthmethodc.c:137/ssh_client_authentication_initialize: Added "publickey" to usable methods.
debug: SshAuthMethodClient/sshauthmethodc.c:137/ssh_client_authentication_initialize: Added "password" to usable methods.
debug: Ssh2Client/sshclient.c:1360/ssh_client_wrap: Creating userauth protocol.
debug: client supports 2 auth methods: 'publickey,password'
debug: Ssh2Common/sshcommon.c:496/ssh_common_wrap: local ip = 10.0.0.7, local port = 60787
debug: Ssh2Common/sshcommon.c:498/ssh_common_wrap: remote ip = xxx.x.xxx.xxx, remote port = 22
debug: SshConnection/sshconn.c:1889/ssh_conn_wrap: Wrapping...
warning: Need basic cursor movement capability, using vt100
debug: Remote version: SSH-2.0-OpenSSH_4.5p1 FreeBSD-20061110
debug: Ssh2Transport/trcommon.c:1373/ssh_tr_input_version: Remote version has rekey incompatibility bug.
debug: Ssh2Transport/trcommon.c:1376/ssh_tr_input_version: Remote version is OpenSSH, KEX guesses disabled.
debug: Ssh2Transport/trcommon.c:1717/ssh_tr_negotiate: lang s to c: `', lang c to s: `'
debug: Ssh2Transport/trcommon.c:1783/ssh_tr_negotiate: c_to_s: cipher aes128-cbc, mac hmac-sha1, compression none
debug: Ssh2Transport/trcommon.c:1786/ssh_tr_negotiate: s_to_c: cipher aes128-cbc, mac hmac-sha1, compression none
debug: Remote host key found from database.
debug: Ssh2Common/sshcommon.c:291/ssh_common_special: Received SSH_CROSS_STARTUP packet from connection protocol.
debug: Ssh2Common/sshcommon.c:341/ssh_common_special: Received SSH_CROSS_ALGORITHMS packet from connection protocol.
debug: server offers auth methods 'publickey,keyboard-interactive'.
debug: Ssh2AuthPubKeyClient/authc-pubkey.c:1323/ssh_client_auth_pubkey_add_file_keys: adding keyfile "/root/.ssh2/id_dsa_1024_a" to candidates
debug: server offers auth methods 'publickey,keyboard-interactive'.
debug: Ssh2AuthClient/sshauthc.c:316/ssh_authc_completion_proc: Method 'publickey' disabled.
debug: server offers auth methods 'publickey,keyboard-interactive'.
debug: Ssh2Common/sshcommon.c:136/ssh_common_disconnect: DISCONNECT received: No further authentication methods available.
warning: Authentication failed.
debug: Ssh2/ssh2.c:117/client_disconnect: locally_generated = TRUE
Disconnected; no more authentication methods available (No further authentication methods available.).
debug: Ssh2Client/sshclient.c:1393/ssh_client_destroy: Destroying client.
debug: SshConnection/sshconn.c:1937/ssh_conn_destroy: Destroying SshConn object.
debug: Ssh2Client/sshclient.c:1446/ssh_client_destroy_finalize: Destroying client completed.
debug: SshAuthMethodClient/sshauthmethodc.c:162/ssh_client_authentication_uninitialize: Destroying authentication method array.

the error on /var/log/auth.log is:
Jun 19 15:28:21 cpanel sshd[52893]: Received signal 15; terminating.
Jun 19 15:28:21 cpanel sshd[56635]: Server listening on :: port 22.
Jun 19 15:28:21 cpanel sshd[56635]: Server listening on 0.0.0.0 port 22.
Jun 19 15:28:27 cpanel sshd[56636]: error: key_read: uudecode AAAA... (the keys)
Jun 19 15:28:27 cpanel sshd[56636]: error: key_read: uudecode AAAA... (the keys again)

can anyone tell me what went wrong?

first of all, i don't seem to find the right sshd_config file on my linux box...

thanks

This question is in progress. Our experts are working on an answer right now.
Sign up for immediate access to the solution once it becomes available.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2008-06-18 at 23:16:03ID23497834
Tags

linux

Topics

Linux Network Security

,

FreeBSD

,

Linux Administration

Participating Experts
4
Points
400
Comments
21

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Trouble logging with snort
    Doing a : ./snort -d -l /var/log/snort -h 172.16.1.0/24 -c /root/snort-2.8.4.1/etc then I open up a separate terminal window and do a tail -f /var/log/snort/alert and nothing shows up. I've portscanned the snort machine and still nothing. Any ideas?
  2. A remote host refused an attempted connect operation.
    We are in the process of setting up a Dell Poweredge 2850 with Red hat Enterprise Linux 3 to be our Disaster Recovery server. Our production data is on an IBM 7026-H80 running AIX 4.3.3. To move all the data and software from the AIX to the Linux we would like to use the rc...
  3. How to enable Login as Root via NX?
    I have a RHEL 4.6 rack mount server running NX Server 3. I am using this for some testing purposes, but I don't want to sit in the server room. I'd like to sit at my desk and remotely work on the server. I have installed the free version of NX Server (with Client and Node...
  4. How to reset iptables to default
    I was creating a firewall with firewall builder, and accidentally installed a firewall that won't let me do anything. (oops...) How do I reset iptables to allow me to get back to normal? I can't ssh, run xserver, or ANYTHING Pulling my hair out, Doc.
  5. TCP: Treason uncloaked!
    I understand that the below indicates a "TCP protocol violation by a box on the other end". That does not mean hacking to my server correct? I'm suspecting that the below has something to do with my servers being down. I'm seeing several of the below and it's from d...
  6. Passive mode on FTP-server behind IPTables with NAT
    I have the following setup: One computer running Slackware 9 with IPTables 1.2.7a protecting a small home network with 4 computers on it. One of these computers (192.168.10.2) is running Windows 2003 and an FTP-server (not IIS) hosting two "sites" one on port 1045...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: ibu1Posted on 2008-06-19 at 00:59:34ID: 21820130

 

by: uetian1707Posted on 2008-06-19 at 01:45:03ID: 21820382

Hi,

Can you please paste your sshd.conf file on your server by removing the origional IP addresses.

 

by: mudskipperwPosted on 2008-06-19 at 17:03:33ID: 21827469

#       $OpenBSD: sshd_config,v 1.74 2006/07/19 13:07:10 dtucker Exp $
#       $FreeBSD: src/crypto/openssh/sshd_config,v 1.42.2.4 2006/11/11 00:51:28 des Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options change a
# default value.

# Note that some of FreeBSD's defaults differ from OpenBSD's, and
# FreeBSD has a few additional options.

#VersionAddendum FreeBSD-20061110

#Port 1666
Port 22
#Protocol 2
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
PermitRootLogin yes
#PermitRootLogin forced-commands-only
#StrictModes yes
#MaxAuthTries 6
AllowUsers user1 user2 user3 user4
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile      ~/.ssh/authorized_keys
#AuthorizedKeysFile     .ssh/known_hosts

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# Change to yes to enable built-in password authentication.
#PasswordAuthentication no
#PermitEmptyPasswords no

# Change to no to disable PAM authentication
#ChallengeResponseAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

# Set this to 'no' to disable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM yes

#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no

# no default banner path
#Banner /some/path

# override default of no subsystems
Subsystem       sftp    /usr/libexec/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
#       X11Forwarding no
#       AllowTcpForwarding no
#       ForceCommand cvs server
                                                       

 

by: mudskipperwPosted on 2008-06-19 at 17:12:23ID: 21827501

uetian1707... i have pasted the sshd_config at the hosting server. as for the one on my client box, i couldn't decide which one it is using. as i uncommented the PubkeyAuthentication line but it still pops up the following warning:
PubkeyAuthentication configuration keyword is deprecated. Use AllowedAuthentications.

i had a feeling that this problem is at the client side.

ibu1... i had a read of the article. it is just a general one on how to setup the SSH. my problem however is more complexed than that can offer. first of all the syntax of auth key on freeBSD is different from the one of Debian. you can't have multiple lines on the encrypted code.

 

by: gheistPosted on 2008-06-22 at 15:43:01ID: 21842520

uudecode may not be installed and ssh client works only with unscrambled keys then

 

by: mudskipperwPosted on 2008-06-22 at 16:47:32ID: 21842702

it was working before: both ssh and scp. then my colleague blocked the root user from sshd_config, then he changed the auth keys. that was where things started going wrong.

 

by: gheistPosted on 2008-06-24 at 00:06:56ID: 21853014

it seems like ssh was upgraded. Are you able to log-in?

 

by: mudskipperwPosted on 2008-06-24 at 00:08:06ID: 21853020

ssh wasn't upgraded. i wasn't able to log in.

 

by: mudskipperwPosted on 2008-06-24 at 00:09:21ID: 21853026

gheist... if you want to help, please read the error messages in the log and tell me how to fix them.

 

by: gheistPosted on 2008-06-24 at 00:26:29ID: 21853086

sshd is installed wrongly without Set-UID attribute and only root is able to log in.
Once it was disabled just nobody can log-in.

 

by: mudskipperwPosted on 2008-06-25 at 16:40:35ID: 21870772

i have tested it with the root user allowed. it still throws the same error --- therefore, logically you are not correct.

 

by: gheistPosted on 2008-06-26 at 03:09:19ID: 21873209

Authentication failure due to scrambled authorized keys file?

 

by: mudskipperwPosted on 2008-06-26 at 03:34:03ID: 21873305

gheist... you have seen my auth keys from the previous question. why didn't you say so at the first place? i am afraid your answer is not good enough.

 

by: gheistPosted on 2008-06-26 at 03:46:51ID: 21873381

installing uudecode on cpenal lunix is complete solution. FreeBSD has one and uses by default.

 

by: RedimidoPosted on 2008-08-05 at 11:10:20ID: 22163442

the log says all:

warning: PubkeyAuthentication configuration keyword is deprecated. Use AllowedAuthentications.
warning: Unrecognized configuration parameter authorizedkeysfile
warning: Unrecognized configuration parameter subsystem

edit your sshd_config on FreeBSD (the server) to have:
AllowedAuthentications          publickey,password,hostbased

restart your sshd server and try  :-)

 

by: mudskipperwPosted on 2008-08-06 at 03:44:04ID: 22168717

i have tried that before. no that didn't fix it. but thanks for the input.

 

by: RedimidoPosted on 2008-08-06 at 10:02:19ID: 22172402

ok let's see. This is what I understood:

you want to connect from linux to a freebsd machine
you created your keys on the linux box.
you copied your keys to the freebsd machine
it is not working.

So let's give a step back and check:
- the use of keys is to avoid using passwords.
- you need to have the private key as id_dsa on your origin linux user ~/.ssh directory
- you need the public key added to the destination user home directory, to the file authorized_keys (maybe if it is freebsd the file can be authorized_keys2)

so if you want to connect from root to root, you need

Linux:
/root/.ssh/id_dsa

FreeBSD:
/root/.ssh/authorized_keys <---- here you copy the content of the id_dsa.pub

I usually do cat id_dsa.pub >> /root/.ssh/authorized_keys   to avoid any fingertip or copy/paste problem.


then you try to ssh from the linux box to the freebsd box, and it should work.

Did you do as described?

 

by: gheistPosted on 2008-08-07 at 12:07:06ID: 22184206

Except that FreeBSD's default setting is PermitRootLogin no...

 

by: RedimidoPosted on 2008-08-07 at 12:45:19ID: 22184616

Yes,

and that can be the problem... if mudskipperw is trying to use root to connect as root to FreeBSD, it should not work, unles that setting is changed (not recommended)

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...