start new:
tmux
start new with session name:
tmux new -s myname
SSH agent forwarding is great. It allows you to ssh from one server to | |
another all the while using the ssh-agent running on your local | |
workstation. The benefit is you don't need to generate ssh key pairs | |
on the servers you are connecting to in order to hop around. | |
When you ssh to a remote machine the remote machine talks to your | |
local ssh-agent through the socket referenced by the SSH_AUTH_SOCK | |
environment variable. | |
So you the remote server you can do something like: |
def matprint(mat, fmt="g"): | |
col_maxes = [max([len(("{:"+fmt+"}").format(x)) for x in col]) for col in mat.T] | |
for x in mat: | |
for i, y in enumerate(x): | |
print(("{:"+str(col_maxes[i])+fmt+"}").format(y), end=" ") | |
print("") | |
# Try it! | |
import numpy as np |