opening ssh port


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers opening ssh port
# 1  
Old 06-04-2002
opening ssh port

I've got openssh installed but when i try to ssh to my machine i get a "port 22: connection refused" message.

Do I need to add something to the hosts.allow file to allow ssh access in?

I'm running Mandrake 8.1
# 2  
Old 06-04-2002
I think it can be the iptables or ipfiltering that block your connection,
try to check their configuration or check the configuration of portmap
also try to modify the hosts.allow and hosts.deny.

Also you can try to disable (for testing) iptables, ipfiltering and
portmap Etc. (if any)

What are the entries on your log files? A
"connection refused" means that your ssh daemon is not running.

Try port scanning your system. Check for port 22 whether it is
closed or not. (Get nmap).
# 3  
Old 06-04-2002
you're right.. ssh isn't running.. how do I turn it on?
# 4  
Old 06-04-2002
just start sshd Smilie and put it in your startup directry or in your config file like rc.conf (depends on what system you run)
# 5  
Old 06-04-2002
Another way for automatic start you can try to place this script on your /sbin/inet.d, name it sshd, and set symbolic links K20sshd and S20sshd in /sbin/init.d/rc3.d to this script. (If you had ssh already installed, just replacing the script will do the job; the symlinks will already be there).

Code:
#! /bin/sh
#
# start or stop the secure shell daemon (ssh)
#
#/sbin/init.d/sshd

case "$1" in
    start)
        if [ -x /usr/sbin/sshd ]; then
            echo "starting ssh daemon."
            /usr/sbin/sshd
        fi
        ;;
    stop)
        echo -n "stopping ssh daemon:"
        killproc -TERM /usr/sbin/sshd
        echo
        ;;
    *)
        echo "Usage: $0 {start|stop}"
        exit 1
esac

exit 0

Type /sbin/init.d/sshd start to start the daemon.
# 6  
Old 06-05-2002
Ok i tried to start sshd by typing in 'service sshd restart' and I got the error:

Could not load host key: /etc/ssh/ssh_host_key
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
Disabling protocol version 1. Could not load host key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available -- exiting.

How do i create the host key?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Opening different UNIX ssh clients simentously

Hi Team , Please advise is thee any ssh terminal open source software by which I can watch all the 4 unix boxes at same time and whatever i will type will get printed on all the 4 different unix boxes at the same time for example one i know is Moba Xterm ssh client software I have share the url... (1 Reply)
Discussion started by: tuntun06060606
1 Replies

2. IP Networking

SSH Port Forwarding - sharing the same port

Hi Linux/Unix Guru, I am setting Linux Hopping Station to another different servers. My current config to connect to another servers is using different port to connect. e.g ssh -D 1080 -p 22 username@server1.com ssh -D 1081 -p 22 username@server2.com Now what I would like to have... (3 Replies)
Discussion started by: regmaster
3 Replies

3. OS X (Apple)

Opening and Closing Shares via ssh

Might anyone have an idea on how to mount an xserve share via ssh, then close the share connection? (3 Replies)
Discussion started by: unimachead
3 Replies

4. Solaris

Please help with opening a port??

Hello all, I need assistance... I need to open a port # 36677 and have it remain open even after a power cycle. I thought all I needed to do was add it to /etc/services. That was not it... Can someone please tell me how to do this. Thank you. (6 Replies)
Discussion started by: komputersman
6 Replies

5. Programming

Opening a TCPIP Port with UNIX C

i am new to UNIX and C (primarilly a JDE and AS400/RPG developer). However, I need to find a way to send data to and from a web service from within a UNIX C program. What i would like to be able to do is to receive in a block of XML (from a non C application), wrap it, and then open a TCPIP... (3 Replies)
Discussion started by: DaveBarber
3 Replies

6. UNIX for Dummies Questions & Answers

Opening a port on HPUX 11

7 I need to connect to a Unidata database using rpc on a HPUX 11 unix machine. The rpc software on Unidata uses port 31438 which does not appear to be available. How can I check the status of this port and activate it for tcp use? (0 Replies)
Discussion started by: SkyBlue
0 Replies

7. AIX

Problem opening port 9998

Hi there, I have been trying to open port 9998 on an AIX 5.1 box to no avail. This machine is not connected to the internet and I have only been accessing it locally, so I know it's not a network firewall/proxy issue. I have tried editing /etc/services and inetd.conf, refreshing inetd.conf, and... (3 Replies)
Discussion started by: erica057
3 Replies

8. Red Hat

ssh-ing to port 80.

i am using redhat 8.0 and trying to connect to my local port 80 to run some HTTP. i know this can easily be done with telnet localhost 80, however telnet is not running, ssh is. ssh localhost -p 80 gives me a "Connection refused" error. i've been trying to find out more information on the web,... (3 Replies)
Discussion started by: effigy
3 Replies

9. UNIX for Dummies Questions & Answers

opening port

i need to open port 1470. how do i do this. whats the command. This is on a solaris box. Thanks (1 Reply)
Discussion started by: ollyparkhouse
1 Replies

10. UNIX for Dummies Questions & Answers

OPening A Port

My mail went down and the company told me to open port 110 on my server. How do I do this? (2 Replies)
Discussion started by: djatwork
2 Replies
Login or Register to Ask a Question