# Wait for children to finish too if this is a daemon that forks Start-stop-daemon -stop -quiet -retry=TERM/30/KILL/5 -pidfile $PIDFILE -name $NAME -chuid $USER Start-stop-daemon -start -quiet -pidfile $PIDFILE -exec $DAEMON -chuid $USER - $DAEMON_ARGS > /dev/null || return 2 Start-stop-daemon -start -quiet -pidfile $PIDFILE -exec $DAEMON -test -chuid $USER > /dev/null || return 1 # Function that starts the daemon/service # Depend on lsb-base (>= 3.2-14) to ensure that this file is present # Load the VERBOSE setting and other rcS variables # Read configuration variable file if it is present To manage settings, users and networks, point your web browser to Try something like this in your IRC client. as the IRC server password like this: user/network:pass. To connect to this ZNC you need to connect to it as your IRC server Are you sure you want to overwrite it? (yes/no) : yes Listen using both IPv4 and IPv6 (yes/no) : yes Useradd -c "ZNC IRC bouncer" -s /bin/bash -m znc We use the recommanded install for wheezy (fromĪpt-get install debian-keyring debian-archive-keyring wget wget -quiet -O - | apt-key add - echo 'deb wheezy main' > /etc/apt//znc.list Ssh grep -q '^PasswordAuthentication' /etc/ssh/sshd_config & sed -i 's/^PasswordAuthentication.*$/PasswordAuthentication no/' /etc/ssh/sshd_config || echo 'PasswordAuthentication no' > /etc/ssh/sshd_config grep -q '^ChallengeResponseAuthentication' /etc/ssh/sshd_config & sed -i 's/^ChallengeResponseAuthentication.*$/ChallengeResponseAuthentication no/' /etc/ssh/sshd_config || echo 'ChallengeResponseAuthentication no' > /etc/ssh/sshd_configīefore exiting, open another console and make sure you can still ssh into the Ssh-copy-id -i ~/.ssh/id.pub Disable SSH Password Authentication > Note that irssi/weechat/whateverircclient in a screen/tmux would do asįirst, ask for a LXC container to [ you get your container, follow those steps: Once done, if you run netstat -atpn | grep 22 you should see the port 22 listening for everybody.IRC is cool, but IRC is volatile. For example, if you want to restrict that only user vignesh can SSH, you can add another directive like this: AllowUsers vigneshĪfter that, simply restart the sshd service. If you're worried about security, you can restrict SSH only to the users you want. Subsystem sftp /usr/lib/openssh/sftp-server You say you want to disable root login, so I'll propose a configuration for your SSH daemon.Įdit the /etc/ssh/sshd_config file and put the following content in it: Port 22 Your status info about the sshd daemon shows running, however no listening port is associated with it (or doesn't seem to).įurther, as you were told in the comments, your sshd_config file seem to be incorrect. Your netstat output shows that there's no process listening to port 22, and that would explain why you get a Connection refused when trying to SSH. Kindly guide me where I am missing the part? How can I get it connected? Now again I tried ssh but again got the error. Unix 3 STREAM CONNECTED 17225 /var/run/NetworkManager/private Unix 3 STREAM CONNECTED 17221 /var/run/NetworkManager/private Unix 3 STREAM CONNECTED 17722 3 STREAM CONNECTED 13422 # Generated by iptables-save v1.4.21 on Wed Sep 23 18:50:34 2015Īs per comment checked netstat -an | grep 22 I though my iptables might be preventing it so configured it as : vim iptables-save > iptables iptables -t nat iptables -t nat iptables -t mangle iptables -t mangle iptables -P INPUT iptables -P FORWARD iptables -P OUTPUT iptables-save > /root/lesĪnd I queried the iptables-save # Generated by iptables-save v1.4.21 on Wed Sep 23 18:50:34 2015 Now again tried to connect ssh via ´ssh not I got connect to host localhost port 22: Connection refused #Privilege Separation is turned on for security UsePrivilegeSeparation yes # HostKeys for protocol version 2 HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_dsa_key HostKey /etc/ssh/ssh_host_ecdsa_key HostKey /etc/ssh/ssh_host_ed25519_key #Use these options to restrict which interfaces/protocols sshd will bind to My sshd_config as follows : What ports, IPs and protocols we listen for Port 22 Vi /etc/ssh/sshd_config and added command to deny root login : Now I tried to connect ssh which requires password so what I did was Reconfigured dpkg-reconfigure openssh-server and it also lead to success Loaded: loaded (/lib/systemd/system/ssh.service enabled)Īctive: active (running) since Wed 17:20:36 IST 36min ago
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |