Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

alias pc ubuntu ssh

Method 1 - Using SSH Config File
$ vi ~/.ssh/config  # 

Host webserver
    HostName 192.168.225.22
    User sk

$ ssh webserver


Method 2 - Using Bash aliases
Open ~/.bashrc or ~/.bash_profile file:
alias webserver='ssh sk@192.168.225.22'

Then, apply the changes using command:
$ source ~/.bashrc

$ webserver
 
PREVIOUS NEXT
Tagged: #alias #pc #ubuntu #ssh
ADD COMMENT
Topic
Name
4+1 =