SSH access from windows does not require any extra software to be installed on your computer. It can be accessed right from your favourite command line tool. Today I'll show you how to easily access your cloud servers via SSH by using your favourite command line tool and save it for you to access it later on as well.
Install GitBash in your computer and then run the following command.
$ cd ~/.ssh // If the above commands returns: bash: cd: /c/Users/junaid/.ssh: No such file or directory // Then run the following commands instead $ mkdir ~/.ssh $ cd ~/.ssh $ explorer .
I am using GitBash because I love it. You can also use the windows command line tool if you prefer (there is a slight difference)
On windows command prompt you can just open windows command prompt from the start menu and run the following commands:
cd .ssh // If the above command returns: The system cannot find the path specified. // Then run the following commands instead mkdir .ssh explorer .
It will open the folder for you. Paste your "Private RSA Key" file in this folder and create a config file("config" no file type extension needed ). If you already have a config file then edit it and copy the following code into it.
Host X HostName xxx.xxx.xxx.xxx User root IdentityFile ~/.ssh/fileNameWhereRSAKeyIsStored IdentitiesOnly yes Port **** ServerAliveInterval 60
Edit the details in the config file and put the HostName, user and port number that you got from the SSH service provider.
For your RSA file you can name it whatever you like (no file name extension needed). The file will be referenced in your config file as
Now, whenever you need to connect to the SSH just run the following command.
$ ssh X
You can also configure more than on SSH hosts if you like. All you have to do is paste your RSA key file and edit the config file. For example, If I have to configure two SSH hosts then my config file would look like this:
Host X HostName xxx.xxx.xxx.xxx User root IdentityFile ~/.ssh/fileNameWhereRSAKeyIsStored IdentitiesOnly yes Port portNumberOfSSH ServerAliveInterval 60 Host Y HostName yyy.yyy.yyy.yyy User root IdentityFile ~/.ssh/fileNameWhereRSAKeyIsStored IdentitiesOnly yes Port portNumberOfSSH ServerAliveInterval 60