rsync -avz -e 'ssh -p 2222' remoteuser@remotehost:/remote/dir /this/dir/
W tym przykładzie łączymy się z komputerem remotehost za pomocą ssh po niestandardowym porcie 2222.
rsync -avz -e 'ssh -p 2222' remoteuser@remotehost:/remote/dir /this/dir/
git clone git@domain.com:project_namepolecenie:
git clone ssh://git@domain.com:Jeśli zmiana nastąpiła w momencie, w którym projekt już istnieje to musimy zmienić ustawienia znajdujące się w pliku .git/config:/
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@domain.com:project_name
na:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = ssh://git@domain.com:port/project_name
źródło: http://readystate4.com/2011/03/30/working-with-git-repos-on-non-standard-ports/
ssh -p 9999 user@adres.mojego-serwera.plwpisać:
ssh -p 9999 user@adres.mojego-serwera.pl -L 9980:localhost:80Po takim zabiegu wchodzimy w przeglądarkę, wpisujemy w pole adresu:
http://localhost:9980i już jesteśmy na Apache'u serwera, który "stoi" na zamkniętym porcie 80.