10/6/12

SSH errors and tips - Ubuntu

If you're trying to connect to remote machine via ssh and receiving the error below:

"ssh: connect to host <hostname> port 22: Connection refused"

Follow the instructions below to solve this issue:

// Login directly to the remote machine

// Check that the ssh service on the remote machine is running
[user@server]$ sudo service ssh status

If you receiving the following massage: ssh stop/waiting than the ssh service is not running.

// Restart the ssh service
[user@server]$ sudo service ssh restart

It will pop up the following massage: 
ssh start/running, process <process number>


--------------------------------------


If you're trying to connect to remote machine via ssh and receiving the error below:


"Read from socket failed: Connection reset by peer"

Follow the instructions below to solve this issue:

// Login directly to the remote machine

// Check that the ssh service on the remote machine is running
[user@server]$ sudo service ssh status

// Generate the public/private keys:
[user@server]$ sudo sshd-generate

Dhcp3-server installation failed - Ubuntu

If you're trying to install the dhcp3-server in ubuntu linux and you're retrieving the following error:

"The following packages have unmet dependencies:

dhcp3-server: Depends: dhcp3-common (= 3.1.3-2ubuntu3.2) but 3.1.3-2ubuntu3.3 is to be installed E: Broken packages"

Follow the instructions below to solve this issue:


// Install the synaptic package

[user@server]$ sudo apt-get install synaptic

// Run the synaptic package (to run the synaptic app you should work in GUI mode)

[user@server]$ synaptic

In Synaptic application search for the dhcp3-common > Select it >

From the menu bar click on Package > Force Version... >
In the popped up window select the following forced version to be installed:
Force version: 3.1.3-2ubuntu3.2 (stable)

This process will do the following:

  1. Remove the packages below: 
    • dhcp3-client
    • wicd 
    • wicd-daemon
    • wicd-gtk
  2. Downgrade the dhcp3-common package
Click on the Apply button

// Install the dhcp3-server package

[user@server]$ sudo apt-get install dhcp3-server

// Install the dhcp3-client package

[user@server]$ sudo apt-get install dhcp3-client

// install the wicd package

[user@server]$ sudo apt-get install wicd