# Linux

## Nfs share mounting

```
mount -t nfs  127.0.0.1:/backup_share /mnt/myfolder -o nolock
```

## Generating shadow hash

Generating sha-512 hashes with python

```
python3 -c 'import crypt;print(crypt.crypt("Password123!", "$6$foobar$"))'
```

Using openssl

```
openssl passwd -6 -salt foobar password123
```

Modifying shadow entry

```
morph3:<hash>:18727:0:99999:7:::
```

## Weird SSH Connections

```
ssh -o KexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-dss morph3@10.3.3.7 -p22000
```

## Port scanning with nc

```
nc -z -v 10.2.2.86 1-65000 2>&1 | grep succeeded

for i in {1..65535}; do echo $i; done | xargs -I% -P 50 sh -c 'nc -z  -w 1 10.2.2.150 %|grep succeeded'

cat ports.txt | xargs -I% -P 50 sh -c 'nc -z  -w 1 10.2.2.22 %|grep succeeded'
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://notes.morph3.blog/linux.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
