LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 08-16-2009, 04:00 PM   #16
ludo33
Member
 
Registered: Feb 2009
Posts: 119

Original Poster
Rep: Reputation: 16
I have...


.. posted the complete output of the commands
 
Old 08-16-2009, 04:03 PM   #17
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
On the debian server, login as user and type
Code:
rm .ssh/known_hosts
note the . before ssh
Then try again
Code:
ssh 127.0.0.1
 
Old 08-16-2009, 04:10 PM   #18
ludo33
Member
 
Registered: Feb 2009
Posts: 119

Original Poster
Rep: Reputation: 16
Tried

> rm .ssh/known_hosts
rm: cannot remove `.ssh/known_hosts': No such file or directory
 
Old 08-16-2009, 04:14 PM   #19
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
You are doing all this as the user, not as root.

How did you installed ssh?
as root
Code:
apt-get install ssh
 
Old 08-16-2009, 04:17 PM   #20
ludo33
Member
 
Registered: Feb 2009
Posts: 119

Original Poster
Rep: Reputation: 16
I used..

..the synaptic package manager to install it.
 
Old 08-16-2009, 04:19 PM   #21
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
try
Code:
apt-get install ssh
 
Old 08-16-2009, 04:24 PM   #22
ludo33
Member
 
Registered: Feb 2009
Posts: 119

Original Poster
Rep: Reputation: 16
ok

> apt-get install ssh
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
libgsf-gnome-1-114 libx264-60 libenca0
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed
ssh
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1202B of archives.
After this operation, 45.1kB of additional disk space will be used.
Get: 1 http://debian.zetnet.co.uk lenny/main ssh 1:5.1p1-5 [1202B]
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
Fetched 1202B in 1s (1075B/s)
Selecting previously deselected package ssh.
(Reading database ... 155549 files and directories currently installed.)
Unpacking ssh (from .../ssh_1%3a5.1p1-5_all.deb) ...
Setting up ssh (1:5.1p1-5) ...
 
Old 08-16-2009, 04:25 PM   #23
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
try again to connect
ssh 127.0.0.1
 
Old 08-16-2009, 04:31 PM   #24
ludo33
Member
 
Registered: Feb 2009
Posts: 119

Original Poster
Rep: Reputation: 16
Ditto

> ssh 127.0.0.1
Host key verification failed.
 
Old 08-16-2009, 04:37 PM   #25
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
are you sure there is no .ssh directory in your home directory?
try
Code:
tail -1 $HOME/.ssh/known_hosts
If there isn't, I would suggest to use synaptic to reinstall
ssh, ssh-server
Seems to me it isn't correct, or fully installed.
It should work out of the box.
 
Old 08-16-2009, 04:49 PM   #26
ludo33
Member
 
Registered: Feb 2009
Posts: 119

Original Poster
Rep: Reputation: 16
That's..

..enough for 1 day )

> tail -1 $HOME/.ssh/known_hosts
tail: cannot open `/root/.ssh/known_hosts' for reading: No such file or directory

I'll try the package manager again tomorrow night.

Thanks for your help.
 
Old 08-16-2009, 04:51 PM   #27
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
tail: cannot open `/root/.ssh/known_hosts' for reading: No such file or directory
You need to be user, not root.
also, you need to ssh as user, not root
 
Old 08-17-2009, 03:35 AM   #28
saifkhan123
Member
 
Registered: Apr 2009
Distribution: Red Hat/CentOS
Posts: 108

Rep: Reputation: 19
Running openssh

first of all we should consider a few things before we are able to ssh when using openssh in Linux, i am using CentOS 5.2 and using openssh 5.1
  • first thing is do we have openssh fully installed i.e openssh 5.1 rpm and openssh-server rpm must be installed.
  • the ssh daemon must be in running state, to check it type
    Code:
    $ /sbin/service sshd status
    if it is not running then type
    Code:
    $ /sbin/service sshd start
  • the firewall(iptables) must have a rule to allow port 22 access which is the default port for ssh, to check that type
Code:
$ /sbin/service iptables status
  • the selinux should be disabled as in my case, i often have problems when selinux is enabled, to disable selinux, open the file
Code:
$ vi /etc/selinux/config
and change the line "SELINUX=enforcing" to "SELINUX=disabled"
Now i hope you will be able to ssh to your machine.
 
Old 08-17-2009, 04:39 AM   #29
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
@saifkhan123
Since telnet 127.0.0.1 22 works, and the error for ssh 127.0.0.1 is
Quote:
Host key verification failed.
The deamon is running, but here is a problem with the Host key verification

The OP needs to remove .ssh//known_hosts as the user who connects to ssh (not the root user), in order to resolve the problem.
 
Old 08-17-2009, 11:32 AM   #30
ludo33
Member
 
Registered: Feb 2009
Posts: 119

Original Poster
Rep: Reputation: 16
Ok guys,

Agains many thanks for your help, Repo you said:

Quote:
The OP needs to remove .ssh//known_hosts as the user who connects to ssh (not the root user), in order to resolve the problem.
Em, er um.... what's an OP ?


Just to continue from where we left off last night...I used apt-get remove ssh as root then tried to install it as user (guess that's wrong too? )

ludo1960@debian:~$ apt-get install ssh
E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

Now if only I knew what OP meant and which file to remove before jumping the gun again, I guess user ludo1960 needs a key too.
 
  


Reply

Tags
installation, openssh



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
OpenSSH dream.impres Linux - Newbie 5 08-05-2008 01:31 AM
I installed openssh for redhat 7.3 but no /etc/ssh/ssh_config file was made akay Linux - Networking 1 11-15-2004 05:19 PM
OpenSSH gregoryfrancis Linux - General 4 03-02-2003 01:09 PM
openSSH Niphargus Linux - Security 4 08-06-2002 08:46 PM
OpenSSH Tarantismic Yak Linux - Security 2 07-14-2001 04:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration