LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ssh problem (https://www.linuxquestions.org/questions/linux-newbie-8/ssh-problem-811416/)

RudraB 06-01-2010 03:43 AM

ssh problem
 
Dear friends,
ssh to my machine is somehow blocked. if someone tries to ssh, it says:
Quote:

[rudra@roddur ~]$ ssh -vv <my name>@<my ip>
OpenSSH_5.4p1, OpenSSL 1.0.0-fips 29 Mar 2010
debug1: Reading configuration data /home/rudra/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to <my ip> [<my ip>] port 22.
debug1: connect to address <my ip> port 22: Connection refused
ssh: connect to host <my ip> port 22: Connection refused
my /etc/ssh/ssh_config is
Quote:

# $OpenBSD: ssh_config,v 1.26 2010/01/11 01:39:46 dtucker Exp $

# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.

# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.

# Site-wide defaults for some commonly used options. For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.

# Host *
# ForwardAgent no
# ForwardX11 no
# RhostsRSAAuthentication no
# RSAAuthentication yes
# PasswordAuthentication yes
# HostbasedAuthentication no
# GSSAPIAuthentication no
# GSSAPIDelegateCredentials no
# GSSAPIKeyExchange no
# GSSAPITrustDNS no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
# Protocol 2,1
# Cipher 3des
# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
# VisualHostKey no
# ProxyCommand ssh -q -W %h:%p gateway.example.com
Host *
GSSAPIAuthentication yes
# If this option is set to yes then remote X11 clients will have full access
# to the original X11 display. As virtually no X11 client supports the untrusted
# mode correctly we set this to yes.
ForwardX11Trusted yes
# Send locale-related environment variables
SendEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
SendEnv LC_IDENTIFICATION LC_ALL LANGUAGE
SendEnv XMODIFIERS
i don't have any config in ~/.ssh
So what is the problem? I am in fedora 13, the firewall allows ssh..

EricTRA 06-01-2010 03:51 AM

Hello,

As stated in the output you posted you are referring to the SSH Client configuration file:
Code:

# $OpenBSD: ssh_config,v 1.26 2010/01/11 01:39:46 dtucker Exp $

# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.

You need to install and configure the SSH server if not already done so. If you've got the server part installed then you might need to configure the sshd_config file.

Check to see if installed:
Code:

which sshd
and if it's listening:
Code:

netstat -aln | grep ":22"
Kind regards,

Eric

alli_yas 06-01-2010 03:51 AM

Hi,

Post the output of:

Code:

#service sshd status
I suspect perhaps that your sshd has not been started.

RudraB 06-01-2010 04:17 AM

thanks!! sshd start solved the problem

alli_yas 06-01-2010 04:19 AM

Good stuff :)

Please don't forget to mark the thread as SOLVED (under Thread Tools).

linuxgurusa 06-01-2010 04:22 AM

Do a chkconfig --list | grep on

Or more specific, check your runlevel by typing the command : runlevel

If you are in runlevel 3 , then type

chkconfig --list | grep 3:on

Make sure you see sshd there, if not, then type command

chkconfig sshd on

RudraB 06-01-2010 04:26 AM

my earlier confusion is solved; but 1 more question.
it seems sshd didnt starts up in boot. how to enable it in starting?

alli_yas 06-01-2010 04:33 AM

Hi,

Run the following:

Code:

# chkconfig sshd on 2345
This will enable it to restart on a reboot and the following will verify the different run levels it has been enabled for:

Code:

# chkconfig --list sshd
sshd            0:off  1:off  2:on    3:on    4:on    5:on    6:off


linuxgurusa 06-01-2010 04:33 AM

Quote:

Originally Posted by advanced (Post 3988362)
my earlier confusion is solved; but 1 more question.
it seems sshd didnt starts up in boot. how to enable it in starting?

See my above post buddy...


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