How to get my ssh key uploaded?
by Pedroski from LinuxQuestions.org on (#6FJQS)
I just bought a new VPS with Ubuntu 22.04 Server
I made an ssh key:
Quote:
I want to upload an ssh key, so I tried this:
Quote:
My last VPS was also Ubuntu 22.04 Server. It used port 22000, so I tried this:
Quote:
Nothing happened for a while, so I pressed ctrl c, then I got this:
Quote:
Any tips please on how to proceed??
What port should I use?
I made an ssh key:
Quote:
pedro@pedro-HP:~$ ssh-keygen -t ed25519 -f ~/.ssh/lamian_ed25519 -C "lamian ssh key" Generating public/private ed25519 key pair. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/pedro/.ssh/lamian_ed25519 Your public key has been saved in /home/pedro/.ssh/lamian_ed25519.pub The key fingerprint is: SHA256:sY25V2jyJFXuNQ4DJ3HSF+FCwGuRCsiXV9HwIRuZl90 lamian ssh key The key's randomart image is: (a picture) pedro@pedro-HP:~$ |
Quote:
pedro@pedro-HP:~$ ssh-copy-id -p 22 -i ~/.ssh/lamian_ed25519 root@123.456.789.123 /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/pedro/.ssh/lamian_ed25519.pub" /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: ERROR: ssh: connect to host 123.456.789.123 port 22: Connection refused |
Quote:
pedro@pedro-HP:~$ ssh-copy-id -p 22000 -i ~/.ssh/lamian_ed25519 root@123.456.7890.123 /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/pedro/.ssh/lamian_ed25519.pub" |
Quote:
^C/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: 183: cannot create /home/pedro/.ssh/ssh-copy-id.9yH3JEhdj7/popids_tmp_id: Directory nonexistent /usr/bin/ssh-copy-id: 189: cannot create /home/pedro/.ssh/ssh-copy-id.9yH3JEhdj7/popids_output: Directory nonexistent grep: /home/pedro/.ssh/ssh-copy-id.9yH3JEhdj7/popids_output: No such file or directory /usr/bin/ssh-copy-id: 202: cannot open /home/pedro/.ssh/ssh-copy-id.9yH3JEhdj7/popids_output: No such file cat: /home/pedro/.ssh/ssh-copy-id.9yH3JEhdj7/popids_tmp_id: No such file or directory /usr/bin/ssh-copy-id: WARNING: All keys were skipped because they already exist on the remote system. (if you think this is a mistake, you may want to use -f option) |
What port should I use?