These are memos for usage of port forwarding with ssh command.
First of all, you need to enable ssh port forwarding with below command.
ssh -f -N -L [#port]:[dest_hostname]:22 [user_name_for_proxy_host]@[proxy_hostname]
If you want to transfer some files use below commands.
scp -P [#port] [user_name_for_dest_host]@localhost:[filename] ./[filename]
scp -P [#port] ./[filename] [user_name_for_dest_host]@localhost:[filename]
If you want to login with ssh, use below commands.
ssh -p [#port] [user_name_for_dest_host]@localhost
No comments:
Post a Comment