0

I am new to SSH and i want to log into a remote server using private key i generated using puttygen. I have already sent my public key to the server admin. I was instructed to execute following command in order to access GUI.

ssh -i <your private key> -D <your forwarding port for the GUI> [email protected]

Can anyone explain what to put for my private key? Is it the file location in my local PC or some place in the remote server ? and what port number to use to access a remote GUI ?

Im using a windows machine with putty. Thank you in advance.

coco
  • 11
  • 1
  • 2
  • You are correct that your private key is stored on your local computer and passed to the server—so the “” portion would be the path to the file. Here is the SSH man page for some more guidance: https://linux.die.net/man/1/ssh. Edit: check the man page for information on the D flag. – JG7 Feb 06 '21 at 18:08
  • 1
    Though if you want to use PuTTY, you have to add the private key path to your PuTTY configuration. The above `ssh` commandline is not relevant for PuTTY, which is GUI terminal client. – Martin Prikryl Feb 06 '21 at 18:09
  • I have already added the private key path to the putty configuration.So i can connect to the server CLI through putty. But i need to access the GUI. Any advice on that ? – coco Feb 06 '21 at 18:30
  • What GUI? Please be more specific. Do you mean the server desktop? Or some X Windows application? Or (based on your `ssh` command), do you want to forward some port that will then be used by some GUI application to access the server? – Martin Prikryl Feb 06 '21 at 18:44
  • Forwarding a port for a GUI to access the server – coco Feb 06 '21 at 18:54
  • Does this answer your question? [Tunnel using PuTTY - equivalent for ssh command?](https://superuser.com/questions/1263587/tunnel-using-putty-equivalent-for-ssh-command) – Martin Prikryl Feb 10 '21 at 11:43

0 Answers0