ssh-keygen -t rsa -f ~/some_folder/username -C username
Tag Archives: ssh
secure root authorized_keys
chattr +i ~/.ssh/authorized_keys
chattr +i ~/.ssh
check public key length
ssh-keygen -lf ~/ssh/rsa_key.pub
2048 d5:cu:15:df:5d:44:…
client_loop: send disconnect: Broken pipe
vi ~/.ssh/config
Host * USER root AddKeysToAgent yes TcpKeepAlive yes ServerAliveInterval 60 ServerAliveCountMax 60
sshd[]: Authentication refused: bad ownership or modes for directory /root
If file and folder permissions are fine but you still have this error:
chown -R root.root /root/
convert ppk to ssh key
sudo dnf install putty
puttygen ~/Downloads/id_rsa.ppk -O private-openssh -o id_rsa.key
chmod 600 id_rsa.key
dynamic SSH port forwarding
ssh -f -N -D 1080 [email protected]
curl -x socks5h://localhost:1080 http://www.srv24x7.com/
Dropbear SSH
A small memory footprint suitable for memory-constrained environments – Dropbear can compile to a 110kB statically linked binary with uClibc on x86 (only minimal options selected)
Dropbear server implements X11 forwarding, and authentication-agent forwarding for OpenSSH clients
Can run from inetd or standalone
Compatible with OpenSSH ~/.ssh/authorized_keys public key authentication
The server, client, keygen, and key converter can be compiled into a single binary (like busybox)
Features can easily be disabled when compiling to save space
Multi-hop mode uses SSH TCP forwarding to tunnel through multiple SSH hosts in a single command. dbclient user1@hop1,user2@hop2,destination
ssh-add Error connecting to agent: Connection refused
mv ~/.ssh/ssh-agent.localhost.localdomain.sock{,_backup}
Then you can relogin to your account and ssh-add work again. It could happen after system crash.
linux ssh append to remote file
echo ‘Your text’ | ssh root@server “cat >> /tmp/some_file”