Accessing a Remote Machine using ssh is simple, just make sure you have SSH running on the remote machine, and that you have generated the key-pair:
# service ssh start
ORThen, generate a Key-Pair:
# start ssh
OR
# /etc/init.d/ssh start
# sshd-generateNext, use your machine to connect to this remote ssh server:
$ ssh <ip-of-the-machine-you-want-to-connect-to>
$ Password: <of-the-user-account-of-the-remote-machine-you-are-connecting-to>
Using SSH to Upload Files on Remote Computer:
Open up a new Terminal and type:
If you get an Error like: "Cannot connect to host. Connection refused", then try removing the '-p 40050' switch. That is, don't specify the port
#scp –P 40050 <PATH>/file.txt <USER-ACCOUNT>@<IP-OF_REMOTE>:<PATH>/file.txt
If error on port 40050, try with -p 22 its works too
ReplyDelete