Useful usages of linux ssh command :
- with `allow agent forwarding` option
ssh -A root@www.theserveryouneed.com
Useful usages of linux ssh command :
ssh -A root@www.theserveryouneed.com
If you want to forward a port to your computer from another, and you can create a ssh connection to the computer, then creating the actual tunnel is very simple.
This exemple forwards the port 7000 from that computer to a port on our computer. In this case the local port in 5000
ssh -N -p 22 user@www.server.com -L 5000/localhost/7000
The hosts file in a computer represents a simple plain text file, where are mapped hostnames to IP addresses (wiki).
To edit this file on Mac OS X is a very simple task:
If you want that your change to take place immediately, run the following command:
Now you can test the new mapping.
This was the problem that I faced these days; and the answer to it is very simple
First thing you have to do is to install putty tools in linux :
$app-get install putty-tools
Then, just generate the new private key, using puttygen program
$puttygen putty-generated-key.ppk -O private-openssh -o openssh-key-name
You see, everything is very simple.
Also, if you want to generate the public key, you can use the following command:
puttygen ‐L putty-generated-key.ppk >> authorized-key-location/public-key.pub
Some useful commands in “linux” to generate a public key from a private one.
ssh-keygen -f ~/id_rsa -y > ~/id_rsa.pub
if you receive some warnings regarding users permissions about the private key file, the easiest way is to run the following command
chmod 700 id_rsa