Showing posts with label ssh. Show all posts
Showing posts with label ssh. Show all posts

Tuesday, February 12, 2019

Thursday, May 31, 2018

ssh config

Example
# contents of $HOME/.ssh/config
Host dev
HostName dev.example.com
Port 22000
User fooey

From: https://nerderati.com/2011/03/17/simplify-your-life-with-an-ssh-config-file/

Tuesday, March 07, 2017

Chrome through ssh tunel

ssh -ND 1080 user@remote_server_ip -p 2222 google-chrome-stable --proxy-server="socks5://localhost:1080" --proxy-bypass-list="localhost;127.0.0.1"

Friday, November 18, 2016

ssh: copy your id_rsa.pub to remote host for no password

Execute on your localhost: ssh-copy-id -i ~/.ssh/id_rsa.pub username@remote-host

Thursday, April 14, 2016

Ubuntu: ssh to tor server

On the server:

Add this to /usr/tor/torrc HiddenServiceDir /var/lib/tor/sshd/
HiddenServicePort 22 127.0.0.1:22

Restart tor sudo service tor restart
Onion hostname file for the ssh service should be created sudo cat /var/lib/tor/sshd/hostname
Take note of the hostname
On the client:
Have tor browser running on the client.

Add this to ~/.ssh/config: host hidden hostname your_onion_hostname.onion
proxyCommand nc -x 127.0.0.1:9150 %h %p

Saturday, May 29, 2010

Example of SSH tunneling

Example:
ssh -N -L 5904:127.0.0.1:5901 username@remoteserverThe above command forwards everything on localhost port 5904 to the port 5901 on remoteserver. This is what I use to connect to a VNC service on port 5901 on a remoteserver at my job from my home computer. Thus, at home, after establishing the above tunnel I can use a vncviewer as follows:vncviewer :4