Difference: SshCommandLine (1 vs. 4)

Revision 42020-07-16 - ReneJanssen

Line: 1 to 1
 
META TOPICPARENT name="FirstTimeUsers"

SSH configuration for Mac and Linux

Line: 148 to 148
 
sed -i 's/wvanburen/my_username/' ~/.ssh/config 
Changed:
<
<
Try
>
>
for Mac users
sed -i '' 's/wvanburen/my_username/' ~/.ssh/config

and Try

 
ssh gw2hpcs04 

It will ask for your passphrase on the gateway hpcgw

Revision 32020-03-27 - MartinMarinus

Line: 1 to 1
 
META TOPICPARENT name="FirstTimeUsers"

SSH configuration for Mac and Linux

Line: 36 to 36
 or
ssh hpcs04
and answer with your HPC-password
Added:
>
>
 And you are on the HPC now
Changed:
<
<
You can automate this procedure to create a ssh-config files called "config" in your .ssh directory.
>
>
You can automate this procedure by creating as ssh-config file. It should be located in your ".ssh" directory, and be called "config".
 This is an example.
Copy and save this file in the .ssh directory and call it config.
Line: 53 to 54
 Host hpcgw HostName hpcgw.op.umcutrecht.nl User wvanburen
Deleted:
<
<
Protocol 2 Port 22
  IdentityFile ~/.ssh/id_rsa_hpc

# usage : ssh gw2hpcs03 Host gw2hpcs03 HostName hpcs03.op.umcutrecht.nl User wvanburen

Deleted:
<
<
Port 22 Protocol 2
  ProxyCommand ssh -i ~/.ssh/id_rsa_hpc -l wvanburen hpcgw.op.umcutrecht.nl nc %h %p 2>/dev/null

# usage : ssh gw2hpcs03X

Changed:
<
<
Host gw2hpcs03
>
>
Host gw2hpcs03X
  HostName hpcs03.op.umcutrecht.nl User wvanburen
Deleted:
<
<
Port 22 Protocol 2
  ForwardX11 yes ProxyCommand ssh -X -i ~/.ssh/id_rsa_hpc -l wvanburen hpcgw.op.umcutrecht.nl nc %h %p 2>/dev/null
Line: 78 to 73
 Host gw2hpcs04 HostName hpcs04.op.umcutrecht.nl User wvanburen
Deleted:
<
<
Port 22 Protocol 2
  ProxyCommand ssh -i ~/.ssh/id_rsa_hpc -l wvanburen hpcgw.op.umcutrecht.nl nc %h %p 2>/dev/null

# usage : ssh gw2hpcs04X

Changed:
<
<
Host gw2hpcs04
>
>
Host gw2hpcs04X
  HostName hpcs04.op.umcutrecht.nl User wvanburen
Deleted:
<
<
Port 22 Protocol 2
  ForwardX11 yes ProxyCommand ssh -X -i ~/.ssh/id_rsa_hpc -l wvanburen hpcgw.op.umcutrecht.nl nc %h %p 2>/dev/null
Line: 95 to 86
 Host gw2hpct01 HostName hpct01.op.umcutrecht.nl User wvanburen
Deleted:
<
<
Port 22 Protocol 2
  ProxyCommand ssh -i ~/.ssh/id_rsa_hpc -l wvanburen hpcgw.op.umcutrecht.nl nc %h %p 2>/dev/null

# usage : ssh gw2hpct02 Host gw2hpct02 HostName hpct02.op.umcutrecht.nl User wvanburen

Deleted:
<
<
Port 22 Protocol 2
  ProxyCommand ssh -i ~/.ssh/id_rsa_hpc -l wvanburen hpcgw.op.umcutrecht.nl nc %h %p 2>/dev/null

# usage : ssh hpcs03 Host hpcs03 HostName hpcs03.op.umcutrecht.nl User wvanburen

Deleted:
<
<
Port 22 Protocol 2
  # usage : ssh hpcs03X Host hpcs03X HostName hpcs03.op.umcutrecht.nl User wvanburen
Deleted:
<
<
Port 22
  ForwardX11 yes

# usage : ssh hpcs04 Host hpcs04 HostName hpcs04.op.umcutrecht.nl User wvanburen

Deleted:
<
<
Port 22
  Protocol 2

# usage : ssh hpcs04X Host hpcs04X HostName hpcs04.op.umcutrecht.nl User wvanburen

Deleted:
<
<
Port 22 Protocol 2
  ForwardX11 yes

# usage : ssh hpct01 Host hpct01 HostName hpct01.op.umcutrecht.nl User wvanburen

Deleted:
<
<
Port 22 Protocol 2
  # usage : ssh hpct02 Host hpct02 HostName hpct02.op.umcutrecht.nl User wvanburen
Deleted:
<
<
Port 22 Protocol 2
  # usage : ssh ft_gw2hpct01 # then start a filezilla session on localhost
Line: 156 to 133
 Host ft_gw2hpct01 HostName hpct01.op.umcutrecht.nl User wvanburen
Deleted:
<
<
Protocol 2
  ProxyCommand ssh -X -i ~/.ssh/id_rsa_hpc -L 8888:hpct01.op.umcutrecht.nl:22 -l wvanburen hpcgw.op.umcutrecht.nl nc %h %p 2>/dev/null

# usage : ssh ft_gw2hpct02

Line: 165 to 141
 Host ft_gw2hpct02 HostName hpct02.op.umcutrecht.nl User wvanburen
Deleted:
<
<
Protocol 2
  ProxyCommand ssh -X -i ~/.ssh/id_rsa_hpc -L 8888:hpct02.op.umcutrecht.nl:22 -l wvanburen hpcgw.op.umcutrecht.nl nc %h %p 2>/dev/null #########################################

Revision 22020-03-27 - ReneJanssen

Line: 1 to 1
 
META TOPICPARENT name="FirstTimeUsers"

SSH configuration for Mac and Linux

Changed:
<
<
# goto you homedirectory

cd

>
>
# goto your homedirectory
cd
  # create a .ssh directory
Changed:
<
<
mkdir .ssh
>
>
mkdir .ssh
  # goto .ssh directory
Changed:
<
<
cd ~/.ssh
>
>
cd ~/.ssh
  # create a ssh keypair
Added:
>
>
ssh-keygen -t rsa -C HPC -f id_rsa_hpc
 
Changed:
<
<
ssh-keygen -t rsa -C HPC -f id_rsa_hpc

# enter 2 times a secret word called "passphrase"

# Save this passphrase in a digital save because you need this later on.

>
>
# enter 2 times a secret word called "passphrase"
# Put this passphrase in a "digital safe" ( p.e. KeepAss see: https://keepass.info/ ) because you need this later on.
  # now you created 2 files like this
Changed:
<
<
-rw------- 1 wvanburen users 1766 Mar 27 11:47 id_rsa_hpc
-rw-r--r-- 1 wvanburen users 385 Mar 27 11:47 id_rsa_hpc.pub

>
>
-rw------- 1 wvanburen users 1766 Mar 27 11:47 id_rsa_hpc
-rw-r--r-- 1 wvanburen users 385 Mar 27 11:47 id_rsa_hpc.pub
 
Changed:
<
<
# copy and paste the content of the public-key named id_rsa_hpc.pub

# and mail this to hpc-systems@lists.umcutrecht.nl

# After the admins configured your public key on the gateway you can try to login into the hpc gateway by

ssh -i ~/.ssh/id_rsa_hpc -l wvanburen hpcgw.op.umcutrecht.nl

>
>
# copy and paste the content of the public-key named id_rsa_hpc.pub
# and mail this to hpc-systems@lists.umcutrecht.nl
# After the admins configured your public key on the gateway you can try to login into the hpc gateway by
 
Added:
>
>
ssh -i ~/.ssh/id_rsa_hpc -l wvanburen hpcgw.op.umcutrecht.nl
 (Give only once a Yes to add the serverkey to your know_hosts file in your .ssh directory)
Changed:
<
<
and enter your selfmade passphrase
>
>
and enter your selfmade passphrase.
 Once you entered the gateway you can continue to log in into the HPC by:
Changed:
<
<
ssh hpcs03
>
>
ssh hpcs03
 or
Changed:
<
<
ssh hpcs04
>
>
ssh hpcs04
 and answer with your HPC-password And you are on the HPC now
Changed:
<
<
You can automate this procedure to create a ssh-config files called "config" in your .ssh directory. This is an example .
>
>
You can automate this procedure to create a ssh-config files called "config" in your .ssh directory.
This is an example.
 Copy and save this file in the .ssh directory and call it config.
Line: 179 to 167
  User wvanburen Protocol 2 ProxyCommand ssh -X -i ~/.ssh/id_rsa_hpc -L 8888:hpct02.op.umcutrecht.nl:22 -l wvanburen hpcgw.op.umcutrecht.nl nc %h %p 2>/dev/null
Added:
>
>
#########################################
 
Changed:
<
<
>
>
With this oneliner you can replace wvanburen in your own username int the file "~/.ssh/config"
 
Added:
>
>
sed -i 's/wvanburen/my_username/' ~/.ssh/config 
 
Changed:
<
<
-- Rene Janssen - 2020-03-27

Comments

>
>
Try
ssh gw2hpcs04 
 
Changed:
<
<
<--/commentPlugin-->
>
>
It will ask for your passphrase on the gateway hpcgw followed by your hpc-password on hpcs04 .

-- Rene Janssen - 2020-03-27

Revision 12020-03-27 - ReneJanssen

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="FirstTimeUsers"

SSH configuration for Mac and Linux

# goto you homedirectory

cd

# create a .ssh directory

mkdir .ssh

# goto .ssh directory

cd ~/.ssh

# create a ssh keypair

ssh-keygen -t rsa -C HPC -f id_rsa_hpc

# enter 2 times a secret word called "passphrase"

# Save this passphrase in a digital save because you need this later on.

# now you created 2 files like this

-rw------- 1 wvanburen users 1766 Mar 27 11:47 id_rsa_hpc
-rw-r--r-- 1 wvanburen users 385 Mar 27 11:47 id_rsa_hpc.pub

# copy and paste the content of the public-key named id_rsa_hpc.pub

# and mail this to hpc-systems@lists.umcutrecht.nl

# After the admins configured your public key on the gateway you can try to login into the hpc gateway by

ssh -i ~/.ssh/id_rsa_hpc -l wvanburen hpcgw.op.umcutrecht.nl

(Give only once a Yes to add the serverkey to your know_hosts file in your .ssh directory)

and enter your selfmade passphrase

Once you entered the gateway you can continue to log in into the HPC by:

ssh hpcs03

or

ssh hpcs04

and answer with your HPC-password And you are on the HPC now

You can automate this procedure to create a ssh-config files called "config" in your .ssh directory. This is an example . Copy and save this file in the .ssh directory and call it config.

#############################################
# file : ~/.ssh/config
# date : 20200327
# expl : default ssh config file example 
#############################################

# usage : ssh hpcgw
Host hpcgw
  HostName hpcgw.op.umcutrecht.nl
  User wvanburen
  Protocol 2
  Port 22
  IdentityFile ~/.ssh/id_rsa_hpc

# usage : ssh gw2hpcs03
Host gw2hpcs03
  HostName hpcs03.op.umcutrecht.nl
  User wvanburen 
  Port 22
  Protocol 2
  ProxyCommand ssh -i ~/.ssh/id_rsa_hpc -l wvanburen hpcgw.op.umcutrecht.nl nc %h %p 2>/dev/null

# usage : ssh gw2hpcs03X
Host gw2hpcs03
  HostName hpcs03.op.umcutrecht.nl
  User wvanburen 
  Port 22
  Protocol 2
  ForwardX11 yes
  ProxyCommand ssh -X -i ~/.ssh/id_rsa_hpc -l wvanburen hpcgw.op.umcutrecht.nl nc %h %p 2>/dev/null

# usage : ssh gw2hpcs04
Host gw2hpcs04
  HostName hpcs04.op.umcutrecht.nl
  User wvanburen 
  Port 22
  Protocol 2
  ProxyCommand ssh -i ~/.ssh/id_rsa_hpc -l wvanburen hpcgw.op.umcutrecht.nl nc %h %p 2>/dev/null

# usage : ssh gw2hpcs04X
Host gw2hpcs04
  HostName hpcs04.op.umcutrecht.nl
  User wvanburen 
  Port 22
  Protocol 2
  ForwardX11 yes
  ProxyCommand ssh -X -i ~/.ssh/id_rsa_hpc -l wvanburen hpcgw.op.umcutrecht.nl nc %h %p 2>/dev/null

# usage : ssh gw2hpct01
Host gw2hpct01
  HostName hpct01.op.umcutrecht.nl
  User wvanburen 
  Port 22
  Protocol 2
  ProxyCommand ssh -i ~/.ssh/id_rsa_hpc -l wvanburen hpcgw.op.umcutrecht.nl nc %h %p 2>/dev/null

# usage : ssh gw2hpct02
Host gw2hpct02
  HostName hpct02.op.umcutrecht.nl
  User wvanburen 
  Port 22
  Protocol 2
  ProxyCommand ssh -i ~/.ssh/id_rsa_hpc -l wvanburen hpcgw.op.umcutrecht.nl nc %h %p 2>/dev/null

# usage : ssh hpcs03
Host hpcs03
  HostName hpcs03.op.umcutrecht.nl
  User wvanburen 
  Port 22
  Protocol 2

# usage : ssh hpcs03X
Host hpcs03X
  HostName hpcs03.op.umcutrecht.nl
  User wvanburen 
  Port 22
  ForwardX11 yes

# usage : ssh hpcs04
Host hpcs04
  HostName hpcs04.op.umcutrecht.nl
  User wvanburen 
  Port 22
  Protocol 2

# usage : ssh hpcs04X
Host hpcs04X
  HostName hpcs04.op.umcutrecht.nl
  User wvanburen 
  Port 22
  Protocol 2
  ForwardX11 yes

# usage : ssh hpct01
Host hpct01
  HostName hpct01.op.umcutrecht.nl
  User wvanburen 
  Port 22
  Protocol 2

# usage : ssh hpct02
Host hpct02
  HostName hpct02.op.umcutrecht.nl
  User wvanburen 
  Port 22
  Protocol 2

# usage : ssh ft_gw2hpct01
#         then start a filezilla session on localhost
# for filetransfer from hpct01 to local machine
Host ft_gw2hpct01
  HostName hpct01.op.umcutrecht.nl
  User wvanburen 
  Protocol 2
  ProxyCommand ssh -X -i ~/.ssh/id_rsa_hpc -L 8888:hpct01.op.umcutrecht.nl:22 -l wvanburen hpcgw.op.umcutrecht.nl nc %h %p 2>/dev/null

# usage : ssh ft_gw2hpct02
#         then start a filezilla session on localhost
# for filetransfer from hpct01 to local machine
Host ft_gw2hpct02
  HostName hpct02.op.umcutrecht.nl
  User wvanburen 
  Protocol 2
  ProxyCommand ssh -X -i ~/.ssh/id_rsa_hpc -L 8888:hpct02.op.umcutrecht.nl:22 -l wvanburen hpcgw.op.umcutrecht.nl nc %h %p 2>/dev/null

-- Rene Janssen - 2020-03-27

Comments

<--/commentPlugin-->
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback