Jump to content

Linux/SSH: Difference between revisions

From Wiki
Marcluer (talk | contribs)
Die Seite wurde neu angelegt: „<pre> ssh-keygen -t dsa -b 2048 </pre> <pre> cat ~/.ssh/*.pub | ssh user@remote-system 'umask 077; cat >>.ssh/authorized_keys' </pre>“
 
Marcluer (talk | contribs)
mNo edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
== SSH port forwarding ==
<pre>
<pre>
ssh-keygen -t dsa -b 2048
$ ssh user@work.example.org -L 10000:172.16.10.10:22
</pre>
</pre>


== SSH Key Login ==
on controlling client:
<pre>
<pre>
cat ~/.ssh/*.pub | ssh user@remote-system 'umask 077; cat >>.ssh/authorized_keys'
ssh-keygen
ssh-copy-id -i ~/.ssh/id_rsa user@server      # Ubuntu up to 22.04
ssh-copy-id user@server                      # Ubuntu from 24.04
</pre>
</pre>
== Use Linux SSH private key in Windows SSH client ==
* Copy
** from Linux:
*** /home/user/.ssh/id_ed...
** to Windows:
*** C:/Users/user/.ssh
[[Category:Linux/Network]]
[[Category:Linux]]

Latest revision as of 16:39, 20 May 2025

SSH port forwarding

$ ssh user@work.example.org -L 10000:172.16.10.10:22

SSH Key Login

on controlling client:

ssh-keygen
ssh-copy-id -i ~/.ssh/id_rsa user@server      # Ubuntu up to 22.04
ssh-copy-id user@server                       # Ubuntu from 24.04

Use Linux SSH private key in Windows SSH client

  • Copy
    • from Linux:
      • /home/user/.ssh/id_ed...
    • to Windows:
      • C:/Users/user/.ssh