Find the answer to your Linux question:
Results 1 to 5 of 5
Hi folks, Ubuntu LAMP 6.06 amd64 The captioned server can be ssh connected on local pc running; $ ssh -p 2222 192.168.0.52 It has been working couple months without problem. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,778

    port forwarding broken


    Hi folks,


    Ubuntu LAMP 6.06 amd64


    The captioned server can be ssh connected on local pc running;

    $ ssh -p 2222 192.168.0.52


    It has been working couple months without problem. Just discover it doesn't work.

    $ ssh -p 2222 192.168.0.52
    Code:
    Bad port ' 2222'

    On /etc/ssh/sshd_config
    Code:
    # What ports, IPs and protocols we listen for
    Port 2222
    Protocol 2
    ....
    I haven't made any change on this file.


    Another strange thing is /var/log/sshd.log disappeared.


    $ sudo locate .log | grep sshd
    No printout


    Please help. TIA


    B.R.
    satimis

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Is sshd running?

    Code:
    ps -ef | grep sshd

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,778
    Quote Originally Posted by Lazydog View Post
    Is sshd running?

    Code:
    ps -ef | grep sshd
    Hi Lazydog,


    Yes, it was running. I tested it before.


    $ ps aux | grep sshd
    Code:
    root      4194  0.0  0.1  25772  1164  ?    Ss  23:51  0.00  /usr/sbin/sshd
    satimis  4595  0.0  0.0   3940    896 tty1 R+  23:50  0:00  grep sshd

    $ sudo /etc/init.d/ssh reload
    Code:
     * reloading OpenBSD ......... [ok ]

    No improvement. Still can't connect.



    However to my surprise after switching off the server several hours it is working again now.


    $ ssh -p 2222 192.168.0.52
    Code:
    The authenticity of host '192.168.0.52 (192.168.0.52)' can't be established.
    RSA key fingerprint is 87:8b:d7:e3:12:f7:8d:76:fe:2d:f7:64:f6:93:fc:a0.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added '192.168.0.52' (RSA) to the list of known hosts.
    Ubuntu 6.06.2 LTS
    Password: 
    Linux satimis.com 2.6.15-52-amd64-server #1 SMP Fri Jul 11 13:33:35 UTC 2008 x86
    _64 GNU/Linux
    satimis.com 2.6.15-51-amd64-server #1 SMP Tue Feb 12 17:08:38 UTC 2008 x86_64 GN
    U/Linux
    
    The programs included with the Ubuntu system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.
    
    Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
    applicable law.

    What I have done before;

    1)
    deleting the content on;

    ~.ssh/know-hosts

    but without reboot afterwards.


    2)
    changing Port 2222 to;

    Port 22

    $ sudo /etc/init.d/sshd reload


    3)
    Tried to ssh-connect the server;

    $ ssh -p 22 192.168.0.52
    Code:
    Bad port ` 22`
    Failed


    4)
    Changing Port 22 back to;

    Port 2222

    then;

    $ sudo /etc/init.d/sshd reload

    Still failed to ssh connect the server.


    But I still can't find /var/log/sshd.log

    $ sudo locate .log | grep sshd
    No printout


    B.R.
    satimis

  4. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    With ssh.log file missing I would question if you have been hacked.
    Have you re-installed the ssh program?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  5. #5
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,778
    Quote Originally Posted by Lazydog View Post
    With ssh.log file missing I would question if you have been hacked.
    I build this server for testing SugarCRM only NOT for production. The server is NOT running round the clock only being turned on during testing (not yet finished). Some rules have been setup on iptables only allowing the local machine of preset IP to get in.


    I'm running Cyrus here having made complicate config to get it work. Cyrus is a great package. However it needs experience using it. This is my first time running Cyrus. I would go back to Courier/Dovecot on my next new server.


    Now I'm still struggling to make Sugar users receiving emails. They can send emails without problem but can't receive emails. The emails are download on Sugar displayed on a popup window but Sugar users never find them on their email folders.


    A few day ahead I also suffered on users can't send emails on their local machine on Evolution via this server. But they can receive emails on Evolution via the server. After having reconfigured Cyrus packages now users can send/receive emails on email client, Evolution, on their local machine


    Have you re-installed the ssh program?
    Whether you meant running;
    Code:
    $ sudo apt-get install --reinstall openssh-server
    No.


    B.R.
    satimis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •