Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-12-2004, 03:39 PM   #1
Registered: Feb 2004
Location: Slovenia
Distribution: archlinux
Posts: 271

Rep: Reputation: 31
ssh login error - unknown command

[user@host /]$ ssh -l guest 22's password: [correct password]
bash: line 1: 22: command not found
[user@host /]$

Why is this happening? It only disconnects me when i type the right password, when I type a wrong one it gives me "permission denied, password:" again, so I definitely have connection. I can give more info on -v if wanted.

Please, help, I desperately need ssh to work on my machine! [] is my machine running the server.

Thanks in advance,

Old 05-12-2004, 03:42 PM   #2
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
You probably have some login scripts that have been misconfigured - on foo take a look at "~/.bashrc" "~/.profile" "~/.bash_profile" "/etc/bashrc" and see if you can see what is logging you out.
Old 05-12-2004, 04:00 PM   #3
Registered: Feb 2004
Location: Slovenia
Distribution: archlinux
Posts: 271

Original Poster
Rep: Reputation: 31
the below is my logfile for the job:
1)I don't have a clue about /etc/bashrc -- did not touch it, seen a lot of if - fi sentences
# .bashrc

# User specific aliases and functions

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc

# User specific environment and startup programs


export PATH
3)~/.profile does not exist
end log

Ok, this is what's there.
ssh session with -v -v:

$ ssh -l guest -v -v 22
OpenSSH_3.5p1, SSH protocols 1.5/2.0, OpenSSL 0x0090701f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
debug1: Connecting to [] port 22.
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.5p1
debug1: next auth method to try is password's password:
debug2: we sent a password packet, wait for reply
debug1: ssh-userauth2 successful: method password
debug1: channel 0: new [client-session]
debug1: send channel open 0
debug1: Entering interactive session.
debug2: callback start
debug1: Remote: X11 forwarding disabled; not compatible with UseLogin=yes.
debug2: channel 0: rcvd adjust 131072
debug2: channel 0: rcvd ext data 36
bash: line 1: 22: command not found

that's it for the important lines.
Old 05-12-2004, 04:37 PM   #4
Registered: Feb 2004
Location: Slovenia
Distribution: archlinux
Posts: 271

Original Poster
Rep: Reputation: 31
I don't know how i did it but it seemed that the motd was missing... that would explain it anyhow. Now it prints the motd and all is well.

Thanks for your help, David!


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
ssh login error Drunkalot Linux - General 8 10-06-2005 10:26 AM
Cron, unknown command Buto Linux - Software 1 09-07-2005 01:09 PM
Login to Linux from Windows command prompt through ssh sysadmn Linux - Networking 1 03-25-2005 04:13 AM
SSH unknown key type homestead1000 Linux - Software 1 01-13-2005 11:24 AM
vsftp - "unknown site command error" RGS461 Linux - Software 3 01-17-2003 09:43 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:36 PM.

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