Connect on Mac(or Linux)
Recently, I find I always forget the way of connecting the SSH with the file named xxxx.key and xxxx.key.pub, these files come from the Oracle Cloud VPS and it’s the only method to connect it.
So I start to record this a bit compelax method of connection.
Way
First of all, we need change the permission of the file named xxxxx.key because if we don’t do this, it will get fault when we try connecting it, it would say “The permission 640 is too open …”, so we need to convert the 640 to 600(only read).
|
|
and then we just cd
the dictionary of the file existed and run the code below:
|
|
Then we could connect it successfully.(the username is the cloud server username, for example my system is Ubuntu 20.04.6 on Oracle Cloud, so my username is ubuntu)