Networking Command: -
Q) Which command is used to connect a remote unix host from local host ?
Ans – ssh or telnet command is used for connecting from local unix host to another remote unix host.
1.
SSH (Secure Shell)
SSH connection is done by port
number 22.
$ ssh ServerName or IPAddress
User Name: -
Password: -
Connected.
$
2.
Telnet
Telnet connection is done by port
number 23.
$ telnet ServerName or IPAddress
User Name: -
Password: -
Connected.
$
Q) How we connect to remote host and also do file transfer ?
Ans – ftp or sftp command is used for remote host connection
and also file transfer between them.
FTP (File Transfer Protocol): -
-Port 21 is used for connection with remote host and port 20
is used for file transfer.
$ ftp servername or ipaddress
Userid: -
Password: -
ftp>
-To Put a single file from local host to remote host as
below.
ftp> put filename1<Enter – Key>
ftp>bye<Enter – Key>
$
-To Put multiple files from local host to remote host as
below.
ftp> mput <pattern of multiple files><Enter –
Key>
ftp>bye<Enter – Key>
-To Get a single file from remote host to local host as
below.
ftp> get filename1<Enter – Key>
ftp>bye<Enter – Key>
-To Get Multiple files from remote host to local host as
below.
ftp> mget <pattern of multiple files><Enter –
Key>
ftp>bye<Enter – Key>
-To Change Path of local host from remote host will be as
below.
ftp> lcd <Local Host Path><Enter – Key>
SFTP (Secure File Transfer Protocol): -
-It is same as FTP, but it is more secure than FTP.
-In industry, SFTP Connection is more preferable.
-In industry, SFTP Connection is more preferable.
-the port number will be 22.
$ sftp servername or ipaddress
Userid: -
Password: -
sftp>
-To Put a single file from local host to remote host as
below.
sftp> put filename1<Enter – Key>
sftp>bye<Enter – Key>
$
-To Put multiple files from local host to remote host as
below.
sftp> mput <pattern of multiple files><Enter –
Key>
sftp>bye<Enter – Key>
-To Get a single file from remote host to local host as
below.
sftp> get filename1<Enter – Key>
sftp>bye<Enter – Key>
-To Get Multiple files from remote host to local host as
below.
sftp> mget <pattern of multiple files><Enter –
Key>
sftp>bye<Enter – Key>
-To Change Path of local host from remote host will be as
below.
sftp> lcd <Local Host Path><Enter – Key>
SCP (Secure Copy) Command: -
Q) Which command is used in both connection and file transfer
in one line ?
Ans – scp
Q) How you transfer files from local host to remote host
using scp command ?
Ans –
scp source destination<Enter – Key>
To Put File to Remote Server,
$ scp /land01/path02/inbound/file34.dat username/password@servername:path<Enter
– Key>
To Get File from Remote Server,
$ scp username/password@servername:/parttion/frz/file345.dat
/lano1/path03/<Enter - Key>
Q) How to get ip address of Unix
Server ?
Ans - $ ifconfig<Enter – Key>
Q) How to get ip address of Window
Server ?
Ans - $ ipconfig<Enter – Key>
No comments:
Post a Comment