User Tools

Site Tools


cheatsheet:genericcli

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
cheatsheet:genericcli [2023/02/21 12:07] – [add user to sudo] kamaradskicheatsheet:genericcli [2023/11/12 12:52] (current) – [notes] kamaradski
Line 220: Line 220:
   Tsx async abort:       Not affected   Tsx async abort:       Not affected
  
-</code> 
- 
-===== keys and certificates ===== 
- 
-==== create id_rsa ssh key ==== 
-<code bash> 
-$ ssh-keygen -t rsa 
-or 
-$ ssh-keygen -t rsa -b 4096 -C "<comment>" 
-</code> 
- 
-==== copy local public key to remote "known_hosts" ==== 
-<code bash> 
-$ ssh-copy-id -i ~/.ssh/id_rsa.pub -p 1234 user@host 
-</code> 
- 
-==== remove a specific host from the known_hosts file ==== 
-<code bash> 
-$ ssh-keygen -f "/home/ubuntu/.ssh/known_hosts" -R "10.0.0.10" 
- 
-# Host 10.0.0.10 found: line 39 
-# Host 10.0.0.10 found: line 40 
-/home/ubuntu/.ssh/known_hosts updated. 
-Original contents retained as /home/ubuntu/.ssh/known_hosts.old 
 </code> </code>
  
Line 371: Line 347:
 </code> </code>
  
 +==== notes ====
 +- By default, when the target on the remote system is a directory and you don't provide a filename, scp expects that the source file name should be used. However, you must ensure that the directory path does not include a trailing slash if you don't specify the filename explicitly.  
 +
 +- Make sure to always use proper paths for the files you are copying. For example for a file in the local folder from where you are issuing the command use "./local.file" instead of just "local.file". This will prevent issues with SCP misinterpreting your intentions.
 ===== other ===== ===== other =====
  
cheatsheet/genericcli.1676981256.txt.gz · Last modified: 2023/02/21 12:07 by kamaradski