Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-20-2006, 04:56 PM   #1
Senior Member
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606

Rep: Reputation: 53
ssh + pop3 with kmail: Could not connect to host localhost, but ok without ssh

I get the kmail message "Could not connect to host localhost" when

ssh -v -2 -p995 -L 11110:localhost:995 sleep 5
kmail configured for username, localhost, port 11110
(instead of normally username,, 995, normal pop3 works fine with kmail without ssh)
Instructions are from
(ever so slightly changed so I run ssh in a terminal before using kmail.
All done as normal user. OpenSSH_4.3p1, mandriva 2005 LE, 2.6.11-13mdkcustom
kmail -v
Qt: 3.3.4 KDE: 3.3.2 KMail: 1.7.2

cat /etc/hosts | grep local localhost

cat /etc/hosts.allow | grep 127

cat /etc/ssh/ssh_config | grep -v ^#
Host *
ForwardX11 yes
ForwardX11Trusted yes
Protocol 2,1
StrictHostKeyChecking no
ssh -v -2 -p995  -L 11110:localhost:995 sleep 5
debug1: Connecting to [] port 995.
debug1: Connection established.
netstat says
TCP 192.168.x.y:50315-> (ESTABLISHED)
192.168.x.y is my private PC behind a dlink router
The port 50315 is random, I thought I would get 11110, no?

Loopback is ok: ifconfig | grep Loop
lo Link encap:Local Loopback

Anyway, I googled around, just a few threads similar, but no solution.
Ideas are appreciated (still a newbie at ntworking really)
Looked into ssh manual, not found a solution there.

PS: No clues in syslog, and cannot find a log for kmail. Running kmail from
command line leaves no messages in the konsole.

Last edited by Emmanuel_uk; 07-20-2006 at 05:02 PM.


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
Kmail - Could not connect to host localhost mike8994 Linux - Newbie 0 10-14-2004 07:56 PM
how 2 connect 2 remote host using SSH fhameed Linux - Networking 2 09-08-2004 08:42 PM
SSH localhost is fine, IPs won't connect zzero Linux - Networking 4 03-24-2004 01:00 PM
can only connect with ssh to localhost Yaukuai Linux - Security 7 10-12-2001 09:08 AM
unable to connect with ssh except to localhost Yaukuai Linux - Software 0 09-30-2001 06:42 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:29 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
Open Source Consulting | Domain Registration