Showing posts with label Unix commands. Show all posts
Showing posts with label Unix commands. Show all posts

Friday, 22 June 2012

ssh connection refused error

Hi,

I am trying to connect remote system with ssh and I have faced below issue. 

ssh umamahesh@123.45.67.891

ssh: connect to host 123.45.67.891 port 22: Connection refused


Here are few things that need to check while connecting to remote system.

1. Does remote system has ssh enables ?

run the below command
> 'sudo /etc/init.d/ssh start'

Here is the error that may rise when there was no ssh installed

sudo: /etc/init.d/ssh: command not found

so you need to install ssh first in your remote system to accept the ssh connections.

run the below command to install ssh

> sudo apt-get install openssh-server openssh-client

Now try the below command

> sudo /etc/init.d/ssh start

Now it should work as ssh installed.

ThanK you,
Uma Mahesh.

Sunday, 10 June 2012

Unix Command to Copy files from remote computer to local computer


Hi,

Here is the command to copy file from remote computer to local system through SSH shell.

> rcp -r root@12.345.67.890:/home/umamahesh/railsknowledge/ local_folder

Above command will connect to IP: 12.345.67.890 as root user and copy the files from  railsknowledge to local folder 'local_folder'

When you run the above command you will be prompted to submit the password. Where you need to submit the root password.

Thank You,
Uma Mahesh.