SSH

Public Access Node
ssh [USERNAME]@ww8access.ww.uni-erlangen.de

ssh direct to your client over 'ww8access'

Add some Host and Proxy configuration to your user ssh config file of your PC at home.

And you can ssh direct to your client inside the institute, which would be on normal ways unreachable.

[AtHome]# ssh ww8User@YourClientName -YC
~/.ssh/config
Host *
        GSSAPIAuthentication yes                                                   
        GSSAPIDelegateCredentials yes   
 
Host ww8access
        User <USERNAME>
        HostName ww8access.ww.uni-erlangen.de
 
Host ww8stud2
        HostName ww8stud2.ww.uni-erlangen.de
        User <USERNAME>
        ProxyCommand ssh <USERNAME>@ww8access -W %h:%p %r
 
 
Host ww8stud3
        HostName ww8stud3.ww.uni-erlangen.de
        User <USERNAME>
        ProxyCommand ssh <USERNAME>@ww8access -W %h:%p %r
 
Host ww8-2024-3
        HostName ww8-2024-3.ww.uni-erlangen.de
        User <USERNAME>
        ProxyCommand ssh <USERNAME>@ww8access -W %h:%p %r
curl https://ww8central.ww.uni-erlangen.de/_export/code/os/linux/ssh?codeblock=2 > ~/.ssh/config

Adapt the rights so ssh will accept the file:

chmod 600 ~/.ssh/config

Change the <USERNAME>-variable to your ww8-username ([YOUR_USERNAME]).

sed -i 's/<USERNAME>/[YOUR_USERNAME]/g' ~/ssh/config

ssh direct to the simulation nodes over 'ww8access'

Add the simulation nodes hosts to your user ssh config file of your PC at home.

In addition to the above mentioned host 'ww8access' you can add the simulation nodes by extending the ssh config file according to the following recipe:

~/.ssh/config
Host sim02
        HostName sim02.ww8kd.fau.de
        User <USERNAME>
        ProxyCommand ssh <USERNAME>@ww8access -W %h:%p

Important here is the different host names of the simulation nodes.

Do not forget to set the correct users' rights as above.

Mount directory from other Client - SSHFS

Mount a direcotry from another client without superuser rights. You only need the right to connect to the other Client via SSH.

sshfs $USERNAME@]$SERVER>:/$DIRECTORY /$LOCALDIRECTORY

Unmounting without superuser rights:

fusermount -u /$LOCALDIRECTORY

Advanced

SSH Tunnel

See also [http://www.ece-help.gatech.edu/pc/remote-desk.html]

ssh -nNT -L 59000:localhost:5900 [USERNAME]@ww8[CLIENT].ww.uni-erlangen.de

VPN Replacement with ssh

Shuttle

On the Client which you want to connect to our network

You need root rights on your linux laptop (or on one of our Student- or Institut-Laptops).

Because of the Institut-Laptops and your personal Laptop which is registered in our internal network, you need to connect to a Client like ww8-node which is also in the internal network (see top - proxy configuration).

sudo sshuttle -r [USER]@ww8-node1 192.168.220.128/25

SSH Key Generation (SSH without typing passwords every time)

Generate a ssh key and type in your password and the name of your key file. This generates a key file and a public key (.pub).

cd ~/.ssh
ssh-keygen -t rsa -b 4096

Make sure, that your files in your .ssh directory have the rights -rw——–. If not, you can change it by

chmod g-r <filename>

Submit your public key to the server

ssh-copy-id -i <public.key> user@server

Copy data (whole directories) from a distant server

ssh $USERNAME@$Server tar czf - /$Directory | tar xzf -
... to a distant server
tar czf - $Directory | ssh $USERNAME@$Server tar -xzf - -C /$destDirectory
Copy data to a distant server and create a compressed tar-archive file
tar czf - stuff | ssh $USERNAME@$Server 'cat - > stuff.tar.bz2'
Log In