skip to Main Content

when i try to connect to with username@hostname and not username@ip my command line return a error:

OpenSSH\ssh.exe: Could not resolve hostname ns335234: H364te inconnu.

I use this tutorial to do it:

https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys-on-debian-10

I try many things now it is 5 hour on and i don t find the solution if good dev can help me. 🙂

My version of linux: debian buster 10.

Thank’ s by advance for any help.

Have a nice day. 😉

3

Answers


  1. Chosen as BEST ANSWER

    I find a new tutoriel i use visual studio with remote dektop (with that you can see your file on the server debian and edit directly on visual studio code it is amazing !!! :) )Install visual studio code +remote desktop module on the client windows.

    ------windows client-------

    1. Create the private and public key on terminal of visual studio code with ssh-keygen add a passs phrase for more security to your private key

    ------Linux Server---------

    1. Copy the public key create on windows client on linux server in /home/user/.ssh/authorized_keys

    3)Do if you are not root ad sudo before chmod -r 700 /home/<user>/.ssh

    4)Do a chmod -r 600 /home/<user>/.ssh/authorized_keys

    -----Windows client-----

    5)Click on connect to host on VSC add ssh username@ip op hostname

    6)In the config file of .ssh you have know Host:alias name HostName:your hostname User:username add it IdentityFile:Path of you private key

    NOW try to connect it work amazing :)


  2. insert a line:

    [ip of target machine] ns335234

    in your C:WindowsSystem32driversetchosts file

    Login or Signup to reply.
  3. Re,

    I find the solution it is just i write authorize_key and normally it is authorize_keys

    1 day lost but know i have a ssh-keygen config to windows client to linux server with visual studio code and a remote desktop

    @Armando Ballaci @ KamilCuk thank you for all your help 🙂

    Have a nice day

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search